summaryrefslogtreecommitdiff
path: root/src/Fl_Text_Buffer.cxx
AgeCommit message (Collapse)Author
2010-11-27Preliminary implementation of Tab characters insisde Fl_Text-*. We still ↵Matthias Melcher
need to test wrapping, etc. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7895 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-08Added smarter Macro to check for utf-8 violations in Fl_Text_*Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7810 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-07Implemented search backwards for utf-8. Tested on MSWindows - OK. Tested on ↵Matthias Melcher
Linux (Ubuntu) - K. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7808 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-06Better alignment testingMatthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7807 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-06Removed some unused stuff and duplicates.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7806 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-06UTF8 Text Display and Editor: added tons of tests for utf8 alignment, fixed ↵Matthias Melcher
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-06Working on correct line wrapping in Fl_Text_Display: starting to replace all ↵Matthias Melcher
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-04Starting to rework Fl_Text_Display from scratch to make wrapping work ↵Matthias Melcher
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-03STR 2158: partially solved. This commit is huge, I admit. I recoded most of ↵Matthias Melcher
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-10-28Fixed a bunch of warnings from gcc 4.4.5 . Most of these are parenthesis ↵Matthias Melcher
missing to make the precedence of && over || obvious. Ah well, why not... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7765 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-10-22Remove OS X Xcode compiler warnings.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7726 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-07-10Updated the Fluid IDE support for the current source file structure. Changed ↵Matthias Melcher
the Fl_Tree rendering code around a bit to make the tree more like MSWindows on Windows and more like Apple on Apple machines. I hope you guys like it. I also moved the function to load Fl_Preferences into an Fl_Tree into the Fl_Tree class where it belongs. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7672 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-20added implementations of fl_wcwidth_() and fl_wcwidth() to src/fl_utf.cengelsman
these supercede the old fl_wcwidth() code in src/xutf8/fl_wcwidth.c. also added corresponding declarations to FL/fl_utf.c, and updated src/Fl_Text_Buffer.c to enable the call to fl_wcwidth() git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7551 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-18Fl_Text_Buffer/Display fixes for UTF-8 / STR-2158 (part 1)engelsman
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-06Marked some more issues with Fl_Text_...Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7462 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-05Another update to Fl_Text_Buffer. This is by no means perfect, but at least ↵Matthias Melcher
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-05Validated utf-8 safety of Fl_Text_Selection.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7443 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-05Little fix that will keep Fl_Text_Display from crashing on German umlauts. ↵Matthias Melcher
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-05Holy Gucamole! NEdit was designed with 'C' style strings in mind. Until that ↵Matthias Melcher
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-05Adde /todo tags to all function which I will remove as soon as I am sure ↵Matthias Melcher
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-05I humbly apologize for this commit, but I just could not bear it anymore. I ↵Matthias Melcher
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
2009-07-04Fl_Text_Display C code simple refactoring:Fabien Costantini
+ Replaced uninitialized C parameters archaisms, by on the fly C++ local var. decl. Not only it will be more optimized by modern c++ compilers, code is easier to read, maintain and debug and is shorter. Most local variables are now explicitly intialized when declared. + Replaced some non const vars by const equivalents when required. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6825 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-07-04UTF8: Fl_Text_Display and related:Fabien Costantini
+ Even more const constraints added to Fl_Text_Selection and Fl_Text_Buffer methods. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6820 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-07-03UTF8: Fl_Text_Display and related:Fabien Costantini
+ Added more const constraints to Fl_Text_Selection and Fl_Text_Buffer methods. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6819 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-07-03UTF8: Fl_Text_Display and related:Fabien Costantini
+ Made char * text() const., this method should be further checked for UTF8 compat. + Added a fixme comment to remember we must check for the potential incorrect assumption that that a buffer size equals the string length + 1. + Correct a protected attrib. typo as we don't need to care about ABI compat. for now. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6818 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-04-15More Fl_Input keyboard fixes / OS X transparency for RGBA data / some utf8 ↵Matthias Melcher
reorganisation git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6765 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-03-24Major documentation update including: now html doc API is sorted, navigation ↵Fabien Costantini
problems/side effects fixed, html tags replaced by proper doxygen commands, parameters command switched from a to p. Includes a pdf update. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6716 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-01-01Added flexible gap size for text buffer (STR #2046)Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6618 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-01-01Changed Copyright in 'src' directoryMatthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6616 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-25+ Cairo branch merged after successful testing on Mac OS X 10.5.4, Linux ↵Fabien Costantini
Ubuntu 8.04,Windows XPSP2. This integration is minimum as discussed, in particular it does not feature any fltk cairo drawing substitution as in fltk2. Still it provides all the fundations to go further even in next 1.4 ... By default *no* cairo features are implemented nor linked, it can only be activated by --enable-cairo whose default is false. Please visit the README.cairo for complete description. + fixed UTF8 compilation pb on linux ubuntu + minor comments fixes on the fly git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6350 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-21More doxygen updates for Fl_Text_Buffer. Also changed some argumentAlbrecht Schlosser
names from "char *s" to "char *text" to be in sync with the docs. Caution: If there will be name conflicts with Fl_Text_buffer::text(), then this can at least be fixed easier, because searching for "text" is better than for "s". I remember that some argument names x,y,w,h have been changed to uppercase, because of conflicts with x(), etc. with ... valgrind (?) or maybe some compilers ? I did this deliberately, because changing the headers and doxygen docs to "s" instead of "text" appeared to be not feasible. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6326 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-21Corrected duplicated paragraph in previous commit.Fabien Costantini
Much prefer the \a syntax rather than the \p syntax as it has the same look that the parameters shown in the function declaration (italic). Should be added to the todo list how to. Completed all other parameters applying the \a modification in this file. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6323 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-20Fixed some typos and links and added a section about document structureAlbrecht Schlosser
and some more to development.dox. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6320 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-19Updating fl_utf8.h references. Fixing copyright date in .fl files.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6311 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-18Doxygen documentation: Fixed most important warnings for the Fl_Widget, ↵Fabien Costantini
Fl_Window, Fl_Valuator classes that should be now a 100% documented. For the rest I drastically reduced the undocumented APIs, but many others (less important) remains. It looks and feels pretty good now :-) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6299 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-15Doxygen documentation WP11 Done!Fabien Costantini
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6255 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-10Merging the UTF8 patch, consisting of O'ksi'd s original 1.1.6 patch and ↵Matthias Melcher
additions by Ian. PLEASE BE AWARE that the patch in its current incarnation is a regression in many aspects and further work is required before we can announce Unicode support. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6212 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-01-04Fixed Fl_Text_Display redrawing for focus changes for primary selection and ↵Matthias Melcher
highlight git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@6011 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-06-06Increased gap size in Fl_Text_Buffer to make the buffer suitable for much ↵Matthias Melcher
longer text, which seems to be a common use. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5181 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-28Fix MacOS X 10.4 compile issues.Michael R Sweet
configure.in: - 10.4 doesn't include libsupc++.a, so we need to use g++ when compiling. src/Fl_Help_View.cxx: - Fl_Help_View::format_table(): missing initialization of font and fsize. src/Fl_Text_Buffer.cxx: - Fl_Text_Buffer::remove_rectangle(): missing initialization of endOffset. src/Fl_Gl_Window.cxx: - Fl_Gl_Window::flush(): use 0xff instead of ~0 for clear_damage() call. test/keyboard.cxx: - Apparently unnamed structs are not supported by Apple's GCC 4.0... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4301 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-16Update source file headers with STR web page.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4288 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-24Copyright updates.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4052 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-09-08Clean up compiler warnings...Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3806 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-06-01Fl_Text_Buffer::replace() now range checks its input (STR #385)Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3436 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-04-11Copyright updates and prep for 1.1.5rc1.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3391 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2003-05-28STR #39: FL_text_Buffer search backward would not allow searching from 1Matthias Melcher
after the last character. this is fixed. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3013 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2003-01-30Copyright update for 1.1.3 release (not quite yet, but soon...)Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2936 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2003-01-12Need <FL/Fl.H>Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2899 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2003-01-12Fix use of free() for memory allocated using new.Michael R Sweet
Fix error messages to use Fl::error() instead of fprintf(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2898 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-11-12Fixed missing undo bug in Fl_Text_Editor. Undo would be performed onMatthias Melcher
text buffer AND attribute buffer, which in turn confused the undo buffer. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2836 ea41ed52-d2ee-0310-a9c1-e6b18d33e121