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; }
+21 -13
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 entity
and is not freed, nor are the style buffer or style table.
\see Fl_Text_Display::buffer(Fl_Text_Buffer* buf)
*/
Note, the text BUFFER that the text display displays is a separate
entity and is not freed, nor are the style buffer or style table.
*/
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);
@@ -201,11 +203,11 @@ Fl_Text_Display::~Fl_Text_Display() {
/** /**
Set width of screen area for line numbers. Set width of screen area for line numbers.
Use to also enable/disable line numbers. Use to also enable/disable line numbers.
A value of 0 disables line numbering, values >0 enable the line number display. A value of 0 disables line numbering, values >0 enable the line number display.
\param width The new width of the area for line numbers to appear, in pixels. \param width The new width of the area for line numbers to appear, in pixels.
0 disables line numbers (default) 0 disables line numbers (default)
*/ */
void Fl_Text_Display::linenumber_width(int width) { void Fl_Text_Display::linenumber_width(int width) {
if (width < 0) return; if (width < 0) return;
@@ -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).
\param buf attach this text buffer
*/ 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
*/
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 */