diff options
| author | Greg Ercolano <erco@seriss.com> | 2020-09-16 13:33:05 -0700 |
|---|---|---|
| committer | Greg Ercolano <erco@seriss.com> | 2020-09-16 13:33:05 -0700 |
| commit | 6f04232dd9a835a1ec764047b79ede5b4e340727 (patch) | |
| tree | e55efa63a16251d0f05e591da8b4df6399095579 | |
| parent | 67347dd76e996c27189813cf36f5061d5b593091 (diff) | |
Added Fl_Text_Display::style_buffer(), solves issue #138
| -rw-r--r-- | FL/Fl_Text_Display.H | 7 | ||||
| -rw-r--r-- | src/Fl_Text_Display.cxx | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/FL/Fl_Text_Display.H b/FL/Fl_Text_Display.H index 59dc24bee..bd390f0a4 100644 --- a/FL/Fl_Text_Display.H +++ b/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 a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index 34f6f38ac..0c963eb07 100644 --- a/src/Fl_Text_Display.cxx +++ b/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, |
