Commit Graph

46 Commits

Author SHA1 Message Date
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
Matthias Melcher 9f87af8ad9
Fl_String refactoring and extension (#683)
- add true unittest and Fl_String testing
- interface and printout are similar to gtest
  without requiring external linkage.
  just run `unittest --core`.
- new Fl_String API
- extended API to fl_input_str and fl_password_str
- co-authored-by: Albrecht Schlosser <albrechts.fltk@online.de>
2023-02-23 15:42:05 +01:00
Albrecht Schlosser a3a60ed27c Improve and clarify documentation of fl_beep() 2022-11-11 16:43:33 +01:00
Albrecht Schlosser 788ca208f7 Rename FL/Fl_String_class.H to FL/Fl_String.H
This is part 2 of the final fix for a previous name clash on case
insensitive file systems (fl_string.h vs. Fl_String.H).
2022-01-16 19:47:16 +01:00
Albrecht Schlosser a0724ab7c4 Add fl_message_icon_label() function (STR #2762)
This message icon label (usually one character) will be used in the
next call of one of the common dialogs.

test/ask.cxx: use fl_message_icon_label()
2021-12-04 20:36:11 +01:00
Albrecht Schlosser 7a7e50df6e Rename FL/Fl_String.H to FL/Fl_String_class.H
The previous name existed already with different case (fl_string.h)
in the FL folder which broke the build on macOS and Windows.

This may be a temporary fix - until I find a better way.
2021-12-04 15:34:41 +01:00
Albrecht Schlosser b6de09cff2 Re-enable nested (aka recursive) common dialogs (STR 3242, #282)
Apply Fl_Dialog_r10831.patch as given in STR 3242:
https://www.fltk.org/strfiles/3242/Fl_Dialog_r10831.patch

Reformat, add missing pieces, rename private members, cleanup...

Improve documentation, add fl_choice_n() (issue #282)

New methods fl_input_str() and fl_password_str() return Fl_String
2021-12-04 14:49:27 +01:00
Albrecht Schlosser 8863ef7901 Avoid multiple definition of macro __fl_attr()
This could happen if both FL/fl_ask.H and fluid/Fl_Type.h were
included in the same file.
2021-10-17 12:24:39 +02: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 46253603de Extend fl_message_position() with 'center' option
Add argument 'center' to position the message box centered over
  the given x/y coordinates.

Add another method to supply a widget or window to center the
  message box over.

Fix documentation and don't use INT_MIN to avoid having to
  include limits.h in user code.
2020-05-07 17:43:04 +02:00
airbrett ee7577a897 Add (x,y) positioning mode to common dialogs
Add new function to set (x,y) position.
Reset to previous mode after innards is called by fl_* function.
Use magic number for preferred position state.

Note: several commits squashed and commit messages edited by AlbrechtS.
2020-05-07 14:59:19 +02:00
Manolo Gouy 163c65dc6f Avoid the expression "foreign language" in comments.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11676 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-20 07:19:19 +00:00
Manolo Gouy 09230a9878 Removed compilation warning when compiling fluid/file.cxx on apple.
Also, added explanatory comment of the purpose of a GNUC-specific
attribute in FL/fl_ask.H

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10501 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-20 15:00:27 +00:00
Manolo Gouy 466cf80f6f Properly Doxygen-comment fl_beep() and the associated enumeration.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9748 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-12-11 17:06:41 +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
Albrecht Schlosser 2c129b4833 Added a default window title function for common dialogs (STR #2562).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8441 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-18 08:52:48 +00:00
Albrecht Schlosser 3bb11b9993 Common dialogs like fl_message() and fl_ask() can now have a window
title (STR #2562).
Added a test case for disabling the hotspot and using a window title
to test/ask.cxx.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8417 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-12 12:08:52 +00:00
Albrecht Schlosser f8c0dd0110 Hotspot behavior of fl_message() and other common dialogs is now
optional (STR #2561).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8415 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-12 11:31:40 +00:00
Matthias Melcher e454f97acc Fixed Copyright to 2010.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7903 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-28 21:06:39 +00:00
Albrecht Schlosser 3cf2305b5c removed support for gcc 2.x (or older), as discussed in fltk.development
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7814 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-11 08:38:36 +00:00
Matthias Melcher 167d767e0f Changed the copyright to 2009 for header files. Still todo: src and test directory.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6614 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-01-01 16:11:32 +00:00
Fabien Costantini fabf5fc181 Fixed bad comments in fl_color_chooser, r g b param are in/out params and not in. Added param and return dox commands to these functions. Added a new Common Dialogs Module containing all fl_ask,fl,fl_color,fl_file dialogs. Fixed the fl_old_shortcut appearing in Fl_Button.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6367 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-10-03 11:20:50 +00:00
Fabien Costantini ae697b80b2 Doxygen documentation : took the opportunity to update copyright info as we modified already in batch almost all sources, added also a fil doxygen command to class headers to harmonize with original matt Fl_Widget dox. format.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6265 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-16 07:26:22 +00:00
Matthias Melcher e63c50b2d1 Rename type Fl_Font_Size into Fl_Fontsize to comply with other naming in FLTK.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6161 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-08-15 21:11:21 +00:00
Matthias Melcher 7c8f5cc888 First attempt at consistently using Fl_Font as a type for the font index and Fl_Font_Size as a type to measure font height (or rather size).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6113 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-04-23 19:09:28 +00:00
Michael R Sweet 0d231668e1 Only use __deprecated__ with GCC 3.0 and higher.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4279 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-13 19:35:28 +00:00
Michael R Sweet a343b0d4e4 Pressing Enter in the file chooser when selecting a directory
will choose that directory if it is currently shown (STR #746)

Added a fl_file_chooser_ok_label() function to set the "OK"
button label for the fl_file_chooser() and fl_dir_chooser()
functions.

Added Fl_File_Chooser::ok_label() methods to set the "OK" button
label.

The fl_ask() function is now deprecated since it does not conform
to the FLTK Human Interface Guidelines.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4188 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-25 16:11:07 +00:00
Michael R Sweet add37faa25 Copyright updates.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4052 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-24 21:55:12 +00:00
Michael R Sweet a3d0905c9e Copyright updates and prep for 1.1.5rc1.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3391 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-04-11 04:39:01 +00:00
Michael R Sweet 00cb676e11 Copyright update for 1.1.3 release (not quite yet, but soon...)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2936 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2003-01-30 21:46:07 +00:00
Michael R Sweet ec494401c1 Make sure all strings can be localized in the dialogs.
Move the "preview" button over so there is room for localization.

Fix the order of buttons in convenience dialogs.

Update "ask" to use the fl_input function.

Fix 4-bit BMP file loading.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2608 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-08-30 16:58:16 +00:00
Michael R Sweet 1d7aef987d Automatically resize the convenience dialogs as needed...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2008 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-03-23 15:35:08 +00:00
Michael R Sweet a235545e42 Fix prototypes for fl_input() and fl_password().
Change how tabs are colored, and update the tabs demo to show it...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1951 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-01-30 13:38:15 +00:00
Michael R Sweet 64b4177ef4 Copyright updates...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1903 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-01-01 15:11:33 +00:00
Michael R Sweet 45658d7c0f Add fl_beep() function.
Don't allow non-int/float text to be pasted into an Fl_Int_Input or
Fl_Float_Input widget.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1690 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-11-17 16:37:48 +00:00
Michael R Sweet 9c19542bd2 Changes for AIX (still have menu problems)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1458 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-05-11 18:37:08 +00:00
Michael R Sweet 94788c4628 Copyright 2001.
FLTK 1.0.11.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1356 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-01-22 15:13:41 +00:00
Michael R Sweet f87393aaa1 OK, now version 1.0.9
Updated email addresses to point to fltk.org domain...

Updated README and CHANGES files accordingly.

Updated makeinclude and Makefile files to put -L../lib before the
LDFLAGS/GLDFLAGS to avoid problem reported by Alexander.

documentation/Makefile wasn't including makeinclude.

Updated FLUID about window to show version 1.0.9.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1168 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2000-06-05 21:21:24 +00:00
Michael R Sweet 4b561b6e90 Updated copyright notices for all of the 1.0.x files.
Updated the configure script for *BSD and GCC 2.95 (-fno-exceptions)

Added install rule to documentation directory.

Dumped old packages directory; added traditional RPM spec file and EPM
list file (that replace all of the packages stuff)

The FLUID man page is now "fluid.1" for the formatted page and "fluid.man"
for the non-formatted page, since only IRIX uses pack'd formatted man pages.

Whew!


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1090 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2000-04-25 22:17:00 +00:00
Michael R Sweet 6bbeac5bd7 fl_ask.H didn't include Enumerations.H, so the DLL stuff wasn't defined.
git-svn-id: file:///fltk/svn/fltk/trunk@330 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-02-23 14:03:26 +00:00
Michael R Sweet ca41e69c27 Updated headers to support WIN32 and OS/2 DLLs.
Updated VC++ project files.

Removed dummymain.c (no longer needed).


git-svn-id: file:///fltk/svn/fltk/trunk@278 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-02-16 22:00:04 +00:00
Michael R Sweet 0a36d98420 Yay, change all copyright notices to be 1998-1999.
git-svn-id: file:///fltk/svn/fltk/trunk@201 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-01-07 19:18:01 +00:00
Michael R Sweet 80b1529ef4 Multiple patches from Bill:
- Double-buffered window fixes.
  - Tabs fixes.
  - X/WIN32 fixes.
  - Fl_Input fixes.
  - Support for vsnprintf and friends.
  - Support for printf-style arguments in utility functions.


git-svn-id: file:///fltk/svn/fltk/trunk@52 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1998-11-05 16:04:53 +00:00
Michael R Sweet 7657a2e4a5 Fixed all the frigging file headings - was missing a $ in the Id string.
Applied some damage bit fixes from Bill Spitzak.


git-svn-id: file:///fltk/svn/fltk/trunk@28 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1998-10-21 14:21:44 +00:00
Michael R Sweet af86963dfa Updated for new heading and CVS tags.
git-svn-id: file:///fltk/svn/fltk/trunk@21 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1998-10-19 21:39:29 +00:00
Michael R Sweet f9039b2ae2 Initial revision
git-svn-id: file:///fltk/svn/fltk/trunk@2 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1998-10-06 18:21:25 +00:00