Fl_Text_Display documentation clarifications.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12135 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Albrecht Schlosser
2016-12-05 17:47:02 +00:00
parent b6bd386231
commit 780755e46a
3 changed files with 25 additions and 13 deletions
+1
View File
@@ -37,6 +37,7 @@ Changes in FLTK 1.4.0 Released: ??? ?? 2017
Other Improvements Other Improvements
- (add here) - (add here)
- Many documentation fixes, clarifications, and enhancements.
Bug Fixes Bug Fixes
+3
View File
@@ -159,6 +159,7 @@ public:
Sets the current text buffer associated with the text widget. Sets the current text buffer associated with the text widget.
Multiple text widgets can be associated with the same text buffer. Multiple text widgets can be associated with the same text buffer.
\param buf new text buffer \param buf new text buffer
\see Fl_Text_Display::buffer(Fl_Text_Buffer* buf)
*/ */
void buffer(Fl_Text_Buffer& buf) { buffer(&buf); } void buffer(Fl_Text_Buffer& buf) { buffer(&buf); }
@@ -166,6 +167,8 @@ public:
Gets the current text buffer associated with the text widget. Gets the current text buffer associated with the text widget.
Multiple text widgets can be associated with the same text buffer. Multiple text widgets can be associated with the same text buffer.
\return current text buffer \return current text buffer
\see Fl_Text_Display::buffer(Fl_Text_Buffer* buf)
\see Fl_Text_Display::buffer(Fl_Text_Buffer& buf)
*/ */
Fl_Text_Buffer* buffer() const { return mBuffer; } Fl_Text_Buffer* buffer() const { return mBuffer; }
+14 -6
View File
@@ -176,13 +176,15 @@ Fl_Text_Display::Fl_Text_Display(int X, int Y, int W, int H, const char* l)
} }
/** /**
Free a text display and release its associated memory. Free a text display and release its associated memory.
Note, the text BUFFER that the text display displays is a separate \note The text buffer that the text display displays is a separate entity
entity and is not freed, nor are the style buffer or style table. and is not freed, nor are the style buffer or style table.
*/
\see Fl_Text_Display::buffer(Fl_Text_Buffer* buf)
*/
Fl_Text_Display::~Fl_Text_Display() { Fl_Text_Display::~Fl_Text_Display() {
if (scroll_direction) { if (scroll_direction) {
Fl::remove_timeout(scroll_timer_cb, this); Fl::remove_timeout(scroll_timer_cb, this);
@@ -328,9 +330,15 @@ const char* Fl_Text_Display::linenumber_format() const {
} }
/** /**
Attach a text buffer to display, replacing the current buffer (if any) Attach a text buffer to display, replacing the current buffer (if any).
Multiple text widgets can be associated with the same text buffer.
\note The caller is responsible for the old (replaced) buffer (if any).
This method does not delete the old buffer.
\param buf attach this text buffer \param buf attach this text buffer
*/ */
void Fl_Text_Display::buffer( Fl_Text_Buffer *buf ) { void Fl_Text_Display::buffer( Fl_Text_Buffer *buf ) {
/* If the text display is already displaying a buffer, clear it off /* If the text display is already displaying a buffer, clear it off
of the display and remove our callback from it */ of the display and remove our callback from it */