FLTK logo

[master] 6f04232 - Added Fl_Text_Display::style_buffer(), solves issue #138

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 6f04232 - Added Fl_Text_Display::style_buffer(), solves issue #138 "Greg Ercolano" Sep 16, 2020  
 
commit 6f04232dd9a835a1ec764047b79ede5b4e340727
Author:     Greg Ercolano <erco@seriss.com>
AuthorDate: Wed Sep 16 13:33:05 2020 -0700
Commit:     Greg Ercolano <erco@seriss.com>
CommitDate: Wed Sep 16 13:33:05 2020 -0700

    Added Fl_Text_Display::style_buffer(), solves issue #138

 FL/Fl_Text_Display.H    | 7 +++++++
 src/Fl_Text_Display.cxx | 1 +
 2 files changed, 8 insertions(+)

diff --git FL/Fl_Text_Display.H FL/Fl_Text_Display.H
index 59dc24b..bd390f0 100644
--- FL/Fl_Text_Display.H
+++ FL/Fl_Text_Display.H
@@ -171,6 +171,13 @@ public:
    \see Fl_Text_Display::buffer(Fl_Text_Buffer& buf)
    */
   Fl_Text_Buffer* buffer() const { return mBuffer; }
+  /**
+   Gets the current style buffer associated with the text widget.
+   Multiple text widgets can be associated with the same style buffer.
+   \return current style buffer
+   \see Fl_Text_Display::highlight_data()
+   */
+  Fl_Text_Buffer* style_buffer() const { return mStyleBuffer; }
 
   void redisplay_range(int start, int end);
   void scroll(int topLineNum, int horizOffset);
diff --git src/Fl_Text_Display.cxx src/Fl_Text_Display.cxx
index 34f6f38..0c963eb 100644
--- src/Fl_Text_Display.cxx
+++ src/Fl_Text_Display.cxx
@@ -407,6 +407,7 @@ void Fl_Text_Display::buffer( Fl_Text_Buffer *buf ) {
 
  \todo  "extendRangeForStyleMods" does not exist (might be a hangover
          from the port from nedit). Find the correct function.
+ \see Fl_Text_Display::style_buffer()
  */
 void Fl_Text_Display::highlight_data(Fl_Text_Buffer *styleBuffer,
                                      const Style_Table_Entry *styleTable,
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.