summaryrefslogtreecommitdiff
path: root/src/Fl_Text_Display.cxx
AgeCommit message (Collapse)Author
2024-01-29RFC: Different approach to Editor tutorial (see #189) (#883)Matthias Melcher
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-25Fix mousewheel problem with Fl_Text_Editor (issue #879)Greg Ercolano
When an Fl_Text_Editor ended up under the mouse, it took mousewheel events for itself, freezing navigation of a parent's Fl_Scroll. Patch handles mousewheel events for both up/down and left/right by checking: > If editor has no scrollbar (e.g. no content to scroll to), then mousewheel events for that scrollbar are ignored so the parent can be navigated. > If editor has a scrollbar, it handles wheel events until scroller reaches an extreme position (e.g. top or bottom), it starts ignoring wheel events so the parent can be navigated.
2024-01-11#885: Fixes keyboard text selection in Fl_Text_EditorMatthias Melcher
2023-12-28Adds Fl_Input RMB menu translation to test/preferencesMatthias Melcher
This also updates the RMB menu labels before every popup so that changing the labels after creating the widgets still reflects that change correctly.
2023-12-21Fix "Fl_Input popup menu customize doesn't work" (#874)ManoloFLTK
2023-11-26Restores mouse pointer before popping up cut/copy/paste menuMatthias Melcher
on Fl_Input and Fl_Text_Display Also adds &ndash; to Help View
2023-11-25Adds pulldown menu to Fl_Text_Display and ..._EditorMatthias Melcher
2023-11-23Added safety when calling Text_Display methodsMatthias Melcher
- before assigning a buffer (Github #845) - also fixed a warning form unused arg in Fl_Terminal
2023-11-07Fixes initial calculation of line number in Fl_Text_Display (#830)Matthias Melcher
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