Commit Graph

73 Commits

Author SHA1 Message Date
Matthias Melcher
9bb9cb3f96 Optimize Fl_Text_Display scrolling speed (#596). 2024-08-04 00:32:11 +02:00
Matthias Melcher
94a75b012f Fixes a bunch of typos in comments. 2023-08-26 15:17:28 +02:00
ManoloFLTK
89454508a2 Fix Fl_Simple_Terminal::append(str, len) assumes a null terminated string (#728) 2023-05-19 18:57:18 +02:00
ZJUGKC
385cabf3aa
Add const qualifiers to can_undo and can_redo (#720) 2023-04-17 16:12:03 +02:00
Matthias Melcher
e18b5353cd Fixed leak in Fl_Text_Buffer #716 2023-04-14 16:54:11 +02:00
Matthias Melcher
7f87c847ba
Unlimited undo/redo for Fl_Input_ and Fl_Text_Buffer (#558) (#676) 2023-02-10 17:13:20 +01:00
Matthias Melcher
4440e35693 Deprecated warnings wording adapted 2023-02-10 16:29:14 +01:00
Matthias Melcher
fc9d0a23af Fixes FL_DEPRECATED for Fl_Text_Buffer.h 2023-02-10 16:29:14 +01:00
Matthias Melcher
8178d005de Missing include for FL_DEPRECATED 2023-02-02 23:13:40 +01:00
Matthias Melcher
1aa6c4fed8
Fix position() methods that shadow Fl_Widget::position()
* `FL_DEPRECATED` macro to mark `position()` method that shadow `Fl_Widget::position()` #69 (#666)
2023-02-02 20:54:19 +01:00
Matthias Melcher
87fe29372c
Local undo per Fl_Text_Buffer and Fl_Input_ (#557) 2022-11-26 20:28:12 +01:00
Albrecht Schlosser
41266df7ae Remove unnecessary system includes from public headers
Add includes of system headers in the implementation files
where necessary.
2021-03-21 00:42:28 +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
Mohammed Alyousef
29ec4e0e55 Fix int highlight() comment 2020-04-15 00:35:32 +02:00
Albrecht Schlosser
c4a755bdf8 Fix some links in documentation
Particularly to Doxygen docs and NEdit which appears to have moved
to sourceforge (according to Wikipedia), see
https://en.wikipedia.org/wiki/NEdit

Note: nedit.org exists but shows some non-English text.
2019-05-15 17:16:11 +02:00
Greg Ercolano
d0e1d16ae8 Added printf() and vprintf() to Fl_Text_Buffer
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12483 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-08 20:38:36 +00:00
Albrecht Schlosser
6b24b20966 Fix confusing behavior of class Fl_Text_Selection.
Fl_Text_Selection got a new method length() and returns 0 in length()
and in all offsets (start(), end(), position()) if no text is selected
(selected() == false).

The behavior in FLTK 1.3 and earlier versions (returning undefined
values if !selected()) was confusing.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12356 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-26 12:32:13 +00:00
Manolo Gouy
936486cb1c Handle non-ASCII characters when selecting a word or moving the cursor by one word.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12149 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-12-17 07:42:54 +00:00
Greg Ercolano
1b238e52cd Bringing over fix [r11766] from 1.3 current to the porting branch.
Doc fix: fixes STR#3312.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11826 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-20 00:50:36 +00:00
Greg Ercolano
2436521610 Bringing over this fix from 1.3 current to the porting branch.
Document savefile() return value, see also references to/from outputfile()



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11823 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-19 23:23:28 +00:00
Albrecht Schlosser
f0f41708a4 Fix typo.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11533 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-05 17:52:58 +00:00
Ian MacArthur
5aefd057d1 Non-changing changes... Attempting to keep the porting branch somehwat in-sync with doc changes in main 1.3.x
None of these changes alter the actual code.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11076 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-28 17:16:32 +00:00
Greg Ercolano
3e96dfe855 Small doc typo fix.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9956 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-08-12 15:46:57 +00:00
Fabien Costantini
157a96aa4b STR2783: make potential null string substituted to an empty string, still achieve internal cleanup in Fl_Text_Buffer::text(s)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9366 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-21 15:05:00 +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
Matthias Melcher
91c9c024cc STR 2499: remove unused function prototypes in Fl_Text_Buffer.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8148 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-31 22:38:03 +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
Matthias Melcher
1bac8a0cca Fixed crashes when Fl_Text_* detects illegal UTF 8 sequences. Widgets will not do any further processing but just jump over the character. Screen representation depends largely on whatever the underlying OS does with those sequences, but I feel that this is out of the scope of this library. (STR 2348)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7965 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-06 18:22:22 +00:00
Albrecht Schlosser
e5fc1560b0 Fixed Doxygen comments, typos, and a few indenting issues.
Part 1, more to come ...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7936 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-02 00:43:07 +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
accf34f276 Implemented search backwards for utf-8. Tested on MSWindows - OK. Tested on Linux (Ubuntu) - K.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7808 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-07 20:13:50 +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
213318ccb3 Removed some unused stuff and duplicates.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7806 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-06 23:16:07 +00:00
Matthias Melcher
8ae745f5b3 UTF8 Text Display and Editor: added tons of tests for utf8 alignment, fixed a bunch of methods that did not understand utf8. Still lots of places to visit.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7800 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-06 14:29:12 +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
engelsman
9545e033bb Fl_Text_Buffer/Display fixes for UTF-8 / STR-2158 (part 1)
fixes to handle incorrect counting of UTF-8 characters by checking
for complete UTF-8 encodings in char* rather than char by char.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7527 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-18 14:33:33 +00:00
Matthias Melcher
29317e7b2d Marked some more issues with Fl_Text_...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7462 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-06 23:00:56 +00:00
Matthias Melcher
2bf6fa6074 A few more comments.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7450 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-05 22:26:29 +00:00
Matthias Melcher
61cf49ddfc Another update to Fl_Text_Buffer. This is by no means perfect, but at least it currently does not crash (I am so easily satisfied :-P).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7449 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-05 22:18:14 +00:00
Matthias Melcher
07a4509a63 Validated utf-8 safety of Fl_Text_Selection.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7443 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-05 21:10:40 +00:00
Matthias Melcher
814da7f392 Little fix that will keep Fl_Text_Display from crashing on German umlauts. This is by no means a fix.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7440 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-05 21:02:48 +00:00
Matthias Melcher
fca1c022e7 Holy Gucamole! NEdit was designed with 'C' style strings in mind. Until that is that someone had the great idea to allow <nul> as a valid character in the text editor. The developers jumped through quite some hoops to allow that without rewriting the core. Well, actually they did: they added a parameter to pretty much every internal call that conatined the null-replacement-character. Anyway, since we only handle 'C' strings, I remove all related code.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7437 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-05 20:22:43 +00:00
Matthias Melcher
d5175c0b88 Adde /todo tags to all function which I will remove as soon as I am sure that they are entirely Unicode safe.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7433 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-05 20:01:10 +00:00
Matthias Melcher
024c4b995b I humbly apologize for this commit, but I just could not bear it anymore. I moved all Doxygen comments from Fl_Text_Buffer.cxx into the header (I kept searching back and forth for the comments) and then did the unthinkable: I reformatted Fl_Text_Buffer.cxx! OMG. It is actually somewhat *readable* now. I shouldn't have done it! It's a mess ;-). Fl_Text_Buffer was modified many times to do things it was never designed to do. And looking at 'svn b;ame', I remember that I tried to quick-fix UTF-8 on top of that. Anyway, I'll dig into this now. I want 1.3.0 out of the door (end of ramble).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7432 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-05 19:52:52 +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
f2fa59fd0f Starting to clean up and document Fl_Text_... to acheive UTF-8 support.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7428 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-05 12:45:03 +00:00
Fabien Costantini
691ab84503 UTF8: Fl_Text_Display and related:
+ Modified selection buffer access methods to return const Fl_Text_Selection pointers. Added a non const get method for the main selection buffer.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6822 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-07-04 00:24:26 +00:00