Commit Graph

78 Commits

Author SHA1 Message Date
Matthias Melcher
f151ecb87b Changing test/editor Shortcut Key Ctrl-i.
The original choice for split screen editing, Ctrl-2, did not
work well on some platforms.
2024-08-19 12:27:18 +02:00
Matthias Melcher
f1c9b198bb Promote fl_strlcpy to <FL/fl_string_functions.h> 2024-03-02 23:49:35 +01:00
Matthias Melcher
4ccadff4b9 Fix test/editor use of strncy to strlcpy 2024-03-02 23:14:07 +01:00
Matthias Melcher
f0c1eff069 Fix typo in function name in editor. 2024-02-06 22:00:11 +01:00
Matthias Melcher
78ae78b118 Add dynamic title to test/editor 2024-02-06 21:25:43 +01:00
ManoloFLTK
6d98c6a8b1
Restore 3-way close window dialog (#900) 2024-02-06 20:27:18 +01:00
Matthias Melcher
d9612e3cc7
RFC: Different approach to Editor tutorial (see #189) (#883)
Update test/editor code and tutorial (#189, #883)

Different, sequential approach to Editor tutorial
Co-authored-by: Albrecht Schlosser <albrechts.fltk@online.de>
2024-01-29 11:43:34 +01:00
Matthias Melcher
cdb51045dd
Background color attribute for Fl_Text_Display. (#378)
* Background color attribute for Fl_Text_Display.

* Adding attributes.

* Avoid clipping horizontal

* Fl_Text_Display underlining.

* Better line positions

* Typos, testing.

* Documentation.
2022-01-27 23:50:06 +01:00
Albrecht Schlosser
5810edaf84 Fix remaining VS compiler warnings in test programs 2021-11-16 21:25:19 +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
8a7d4c9f61 Remove CodeWarrior "support"
Metrowerks CodeWarrior was an ancient macOS compiler (discontinued
since 2005) that defined the macro __MWERKS__. Code using this macro
and several comments have been removed.
2020-03-11 14:38:02 +01:00
Manolo Gouy
305e5dd21e Try dummy commit
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12990 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-07-02 15:21:57 +00:00
Albrecht Schlosser
52ae3582a2 Replace "WIN32" with "_WIN32" or "Windows".
Replace compiler/preprocessor/platform macro "WIN32" with "_WIN32".
Replace "WIN32" in text and documentation with "Windows".
Replace "MSWindows" with "Windows".

To do: README.Windows.txt (and maybe other documentation as well)
needs updates.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12655 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-09 14:39:42 +00:00
Albrecht Schlosser
42d8aba117 Replace FL/x.H with FL/platform.H - step 2 (STR #3435).
This second step replaces FL/x.H with FL/platform.H in all source files.
Dependencies have been adjusted as well.

This commit completes the replacement of FL/x.H with FL/platform.H.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12641 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-31 21:17:17 +00:00
Albrecht Schlosser
f54863db44 Add some test options to test/editor.cxx.
These options are not enabled by default, but you can enable them by
defining macro DEV_TEST. This adds buttons to toggle wrap mode,
scrollbar positions, and to increase or decrease the window size (width).

Note: this can be used to test STR #3272 and the fixes in a follow-up
commit.

Note: same changes as r11204 in branch-1.3.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11207 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-22 17:21:17 +00:00
Greg Ercolano
889a8a6d42 Fixes STR #3169, comments #4, #5 and #7.
Prevents warnings from the OSX 10.9.x clang compiler.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10493 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-19 03:47:32 +00:00
Albrecht Schlosser
31512b7323 Fix a tiny memory leak in test/editor and remove useless style_init().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10360 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-05 19:49:19 +00:00
Manolo Gouy
5899b2cc6d Added missing include x.H
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10338 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-09-26 17:11:21 +00:00
Greg Ercolano
b04ec356b3 Added as per RFC on fltk.coredev 05/23/2014.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10164 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-05-23 23:32:27 +00:00
Greg Ercolano
46521bf437 Implements STR #2621: Add line numbers to Fl_Text_Display.
Applied LZA's patch and included some mods to address TODO items and ABI issues.

Also update CREDITS with LZA and a few other notably absent names.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10152 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-05-21 06:56:59 +00:00
Manolo Gouy
155e099f4a Documented how to make a Mac OS FLTK application launchable by dropping files on its icon.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9718 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-11-13 13:03:20 +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
Manolo Gouy
f763b4b709 Use adequate shortcut for "New View" on the Mac platform.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8602 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-18 11:29:30 +00:00
Albrecht Schlosser
7ada14f3b7 Reverting unintentionally committed experimental code in r8256. Sorry.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8258 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-11 13:40:26 +00:00
Albrecht Schlosser
313352b55f Updated documentation/README to reflect the new distribution of
pre-generated documentation as separate downloads.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8256 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-11 13:06:15 +00:00
Matthias Melcher
e3fde20cf8 Using FL_COMMAND in test/editor shortcuts to make it Mac Keyboard compatible.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8150 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-01 03:24:35 +00:00
Ian MacArthur
1e9e3970bd File was changed to use FL_PATH_MAX so needed to have <FL/filename.H> added to the include files so that it would compile on WIN32 hosts.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8075 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-20 13:57:11 +00:00
Matthias Melcher
9092dccab8 Changed all fixed filename buffers (that I could find) to use FL_PATH_MX instead. Raised FL_PATH_MX from skipy 256 characters to 2048, which corresponds with modern file systems.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8063 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-19 21:20:10 +00:00
Manolo Gouy
f451946d42 Homogenize use of re-encoding and transcoding (in favor of the latter).
Also, makes clear that the code is ready to deal with any encoding, not just fixed-length ones.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8040 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-15 17:38:39 +00:00
Manolo Gouy
85a03a76c9 Fix STR #2348. Files encoded with UTF-8 or CP1252 are accepted. Any non-UTF-8-encoded
data is interpreted according to CP1252 and transcoded to UTF-8. By default, a warning
message is displayed when the input file was transcoded. This default behavior can be 
modified by changing a function pointer. A flag has been added to the Fl_Text_Buffer object
that informs the caller if the input file was transcoded to UTF-8.
The Fl_Text_Buffer.cxx file contains some preliminary code that could be used in the future
to input other encodings provided they are fixed-length (e.g., all ISO-8859-* character sets,
UTF-16). This code is not compiled at this point.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8004 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-10 19:24:28 +00:00
Albrecht Schlosser
f6975396a8 Reverted unintenional change of test/editor.cxx
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7948 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-04 12:06:29 +00:00
Albrecht Schlosser
2db2db587c Fixed typos and reformatted some lines that were longer than 80 characters.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7947 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-04 12:03:08 +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
Matthias Melcher
f560b71b0a Fixed Fl_Text_Display Tabulator calculations (STR #2450)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7897 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-27 21:15:52 +00:00
Matthias Melcher
1a793cdbc3 Tab is now alway 8 characters wide.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7896 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-27 20:49:27 +00:00
Matthias Melcher
c6e46fed45 Preliminary implementation of Tab characters insisde Fl_Text-*. We still need to test wrapping, etc.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7895 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-27 20:13:10 +00:00
Matthias Melcher
917e5991db Removed UTF-8 codes that would make the SGI compiler crash. STR 2439.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7828 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-14 15:57:49 +00:00
Matthias Melcher
35c8c77e5e This should fix all remaining issues with Fl_Text_*. Wrapping is no pixel aligned. Pressing up and down will be pixle bound. A few crashes removed (we still crash with faulty UTF-8svn diff | grep Index:). Fixed blinking selection when outside the widget. Added dnd sending and receiving.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7819 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-11 19:08:52 +00:00
Matthias Melcher
f099311481 Better alignment testing
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7807 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-06 23:58:57 +00:00
Matthias Melcher
0fb4feb11a Working on correct line wrapping in Fl_Text_Display: starting to replace all byte based charracter calculations with utf8 functions. Current version wraps, but scroll bars are wrong. Non-wrapping text display starts to work better.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7797 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-06 00:29:58 +00:00
Matthias Melcher
38dcb5a463 Starting to rework Fl_Text_Display from scratch to make wrapping work correctly. Fixed a few issues that made wrapping crash. Using ASCII range only with fixed character sizes should still wrap as expected?!
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7794 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-04 21:53:56 +00:00
Matthias Melcher
cac40a9b02 STR 2158: partially solved. This commit is huge, I admit. I recoded most of Fl_Text_Buffer and large chunks of Fl_Text_Display to make it UTF-8 safe. Rendering of all left-to-right scripts works well on OS X for all tested fonts. International input works AFAIK. Copy and paste of UTF-8 data works. ----> what's not working yet though is line wrapping. Also, text search for internationsl characters is not working yet.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7792 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-03 22:01:43 +00:00
Albrecht Schlosser
9f1fdb0887 made test/editors textsize "configurable" (by macro TS)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7686 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-08-24 08:12:50 +00:00
Matthias Melcher
f62fa46736 Fixes to VisualC6 project setup
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7584 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-05-02 21:12:55 +00:00
Manolo Gouy
590020a945 Replaced fl_file_chooser() by Fl_Native_File_Chooser uses in test programs
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7509 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-15 11:27:15 +00:00
Matthias Melcher
769ebeeba7 Tearing my hairs out about terminology in utf-8
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7429 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-05 12:55:14 +00:00
Matthias Melcher
b737694f4a test/Editor was freeing the text buffer too soon and no clearing callbacks. (STR #2294)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7106 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-02-19 21:08:34 +00:00
Matthias Melcher
a6e76c29fd Cahngad copyrights in 'test'
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6615 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-01-01 16:35:13 +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
93cb7b5487 STR 1264: Editor uses "delete" instead of the required "delete_widget"
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5081 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-05-05 13:38:47 +00:00