summaryrefslogtreecommitdiff
path: root/src/Fl_Text_Display.cxx
AgeCommit message (Collapse)Author
2023-10-10Fix default color of ATTR_GRAMMAR/ATTR_SPELLING (#790)leen
2023-04-14Fixed leak in Fl_Text_Buffer #716Matthias Melcher
2023-02-07Fix "\todo TextDPosToLineAndCol does not exist"ManoloFLTK
2023-02-07Fix "\todo TextDEndOfLine and BufEndOfLine functions don't exist"ManoloFLTK
2023-02-06Fix "\todo Complete documentation of class Fl_String"ManoloFLTK
Also - fix "\todo Unicode?" in Fl_Text_Display::display_insert() after verification - fix "\todo [Internal] The user_data value must be implemented using \p fl_intptr_t" because that's now in place.
2023-01-28Fix comments and remove a 'todo' item from docsAlbrecht Schlosser
Comments and docs only, no code changes.
2022-12-09Suppress (GitHub CI/wayland) compiler warningAlbrecht Schlosser
[ 15%] Building CXX object src/CMakeFiles/fltk.dir/Fl_Text_Display.cxx.o .../fltk/src/Fl_Text_Display.cxx: In constructor ‘Fl_Text_Display::Fl_Text_Display(int, int, int, int, const char*)’: .../fltk/src/Fl_Text_Display.cxx:122:57: warning: ‘void* __builtin_memset(void*, int, long unsigned int)’ writing between 4 and 8589934584 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=] 122 | for (int i=1; i<mNVisibleLines; i++) mLineStarts[i] = -1; | ~~~~~~~~~~~~~~~^~~~ .../fltk/src/Fl_Text_Display.cxx:120:39: note: at offset 4 into destination object of size 4 allocated by ‘operator new []’ 120 | mLineStarts = new int[mNVisibleLines]; | ^ This warning is IMHO obsolete because the code in question should not be executed at all (mNVisibleLines == 1). However, the compiler seems to substitute this with '__builtin_memset(...)' and analyzes "correctly" that memory at offset 4 would be overwritten but not that the written size would be 0. The "fix" uses a compiler macro and #if to clarify that this code must not be executed and should not be compiled (see comment why this code exists).
2022-12-09Fix Fl_Text_Display drawing of line numbers (#578)wcout
The formerly undrawn rectangle beneath (or above) the line numbers is now filled with FL_BACKGROUND_COLOR. Additionally the small rectangle between the scrollbars is now filled with FL_BACKGROUND_COLOR instead of FL_GRAY for consistency.
2022-11-24Fix two Visual Studio compiler warningsAlbrecht Schlosser
+ fix trailing whitespace (fluid)
2022-11-22Fix selection extension in Fl_Text_*, issue 196 (#550)Matthias Melcher
Selecting a text range programmatically would not sync some variables with the actual selection. This also fixes a crash bug in macOS when dragging text that was selected by buffer()->select() only.
2022-11-12Removed FIXME comment that was already solved.Matthias Melcher
2022-11-05Wayland/X11 hybrid: use "bool fl_disable_wayland;" declaration.ManoloFLTK
2022-09-26Replace all calls to sprintf() by calls to snprintf().ManoloFLTK
2022-01-30Adding Text_Display color variables. (#384)Matthias Melcher
2022-01-27Background color attribute for Fl_Text_Display. (#378)Matthias Melcher
* Background color attribute for Fl_Text_Display. * Adding attributes. * Avoid clipping horizontal * Fl_Text_Display underlining. * Better line positions * Typos, testing. * Documentation.
2022-01-16Rename FL/fl_string.h to FL/fl_string_functions.hAlbrecht Schlosser
This is part 1 of the final fix for a previous name clash on case insensitive file systems (fl_string.h vs. Fl_String.H).
2022-01-07Re-organize cross-platform support for text input methods.ManoloFLTK
FLTK 1.3 supports complex text input methods (TIMs) for the 3 platforms (X11, Windows, macOS). This support has an interface with FLTK that is common for X11 and Windows, via (undocumented) functions fl_set_spot(), fl_set_status() and fl_reset_spot(). In contrast, and because it's been developed independently, the interface between the macOS TIM and FLTK 1.3 is completely different : static functions FL::insertion_point_location() and Fl::reset_marked_text(). The present change implements a single TIM/FLTK interface used by all platforms based on functions fl_set_spot() and fl_reset_spot(). The previous macOS-specific functions FL::insertion_point_location() and Fl::reset_marked_text() are maintained only for compatibility with 1.3 and deprecated.
2022-01-05Fix whitespace and Makefile dependenciesAlbrecht Schlosser
No code changes
2021-12-17Updated Unicode utf8 byte limit in docs.Matthias Melcher
2021-12-17GitHub #233, documenting style buffers and utf8.Matthias Melcher
2021-12-12Fix IME problem (issue #270)YX
2021-12-08STR 3460.C: Code Properties remembers the editor's scroll bar position.Matthias Melcher
2021-03-13Fast pango (#201)ManoloFLTK
* Cache single unicode character widths under Xft+Pango
2021-02-13Remove compilation warnings issued by Visual Studio 2019.ManoloFLTK
2020-09-17Noted unused variable in Fl_Text_Display..Greg Ercolano
2020-09-16Added Fl_Text_Display::style_buffer(), solves issue #138Greg Ercolano
2020-08-01Implement + deploy fl_strdup()Greg Ercolano
2020-07-06Remove $Id$ tags, update URL's, and moreAlbrecht Schlosser
- 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-03-08Update Fl_Text_Display documentationAlbrecht Schlosser
No code changes except minor formatting and trailing whitespace.
2020-02-11Fix static analyzer issues in Fl_Text_DisplayAlbrecht Schlosser
Remove unused variables and unused code to silence warnings.
2020-01-15Fix uninitialized vars in calls to fl_clip_box() (issue #6)Albrecht Schlosser
The main fixes are only to avoid static code analyzer warnings reported in issue #5, but there are also minor bug fixes included. These bug fixes are more of theoretical concerns though. Close #6.
2019-02-04Fixed Fl_Text_Editor selection range after paste (STR #3248).Matthias Melcher
2019-02-01Additional fix for STR #2531Matthias Melcher
Wiggeling characters in Fl_Text_Display due to advanced kerning.
2019-02-01STR 2531: Fl_Text_Display no longer wiggles.Matthias Melcher
On MacOS and other systems that support kerning, dragging a selection over text would make the text to the right of the selection jump in x by a fraction of a pixel. The new code makes sure that the text stays rock solid.
2019-01-17Android CMake: icons, docs, more appsMatthias Melcher
2018-06-26Move Fl_Screen_Driver.H from FL/ to src/Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12975 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-21Android: on-screen keyboard no longer pops up on text output widgetsMatthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12959 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-18Fix Fl_Text_Editor overstrike mode (STR #3463).Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12849 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-31Replace FL/x.H with FL/platform.H - step 2 (STR #3435).Albrecht Schlosser
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
2017-11-23Fixes issued raised in STR #3422; Fl_Text_Display constructor order issues;Greg Ercolano
organize member initialization first, method calls last. Also: Reorg'ed member initialization to match order in .H to detect missing member inits. Noticed member mModifyingTabDistance is unused. Tagged with XXX: but left in place, since it's a protected member, and might be utilized by user code. We should probably remove this member. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12570 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-05Fix drawing of tab characters when display is rescaled.Manolo Gouy
The problem is announced in comment #99 of http://www.fltk.org/str.php?L3320 git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12544 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-02Addresses STR# 3423; adds missing scrollbar_size() methods and honors global ↵Greg Ercolano
Fl::scrollbar_size(). Includes mods to unittest's scrollbar size test. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12538 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-28Solves STR# 2682, Albrecht's comment #13. Applied slightly modified version ofGreg Ercolano
chris's test_02.diff patch (comment #19). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12532 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-27STR #3395: Revisions as per chris's comment #4.Greg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12530 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-26Solves STR#3395.Greg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12529 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-25Fix scrollbar issue of Fl_Text_Display (STR #3412).Albrecht Schlosser
This fix disables a part of the optimization introduced in svn r11208 (STR #3272). For more information see comments in STR #3412. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12526 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-21Revert accidentally committed part of r12511 (STR #2788).Albrecht Schlosser
r12511: "Addresses STR #2788 for cursor positioning with mouse-click ..." The here reverted part was the proposed patch of STR #3412: "Fl_Text_Display scroll bug (style table with font != textsize() + wrap)". See patch file: http://www.fltk.org/strfiles/3412/quickfix.patch git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12518 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-18Addresses STR #2788 for cursor positioning with mouse-click on different ↵Greg Ercolano
sides of character. Applying guyben's patch (with small mods suggested by albrecht & greg in comments 7-11). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12511 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-02-04Fix line number alignment in Fl_Text_Display/Editor (STR #3363).Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12170 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-02-01Fl_Text_Display documentation updates.Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12168 ea41ed52-d2ee-0310-a9c1-e6b18d33e121