summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2016-12-05 17:47:02 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2016-12-05 17:47:02 +0000
commit780755e46a65e932319fa508a6372a306beda36f (patch)
tree9f46b03679cf9107d8699786b1a84ee4a0b7ad95 /src
parentb6bd386231b9c8a385f1402bed44514f8dc02ffa (diff)
Fl_Text_Display documentation clarifications.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12135 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Text_Display.cxx34
1 files changed, 21 insertions, 13 deletions
diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx
index e3a2b8947..52c506715 100644
--- a/src/Fl_Text_Display.cxx
+++ b/src/Fl_Text_Display.cxx
@@ -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() {
if (scroll_direction) {
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.
- Use to also enable/disable line numbers.
- 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.
- 0 disables line numbers (default)
+ Set width of screen area for line numbers.
+ Use to also enable/disable line numbers.
+ 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.
+ 0 disables line numbers (default)
*/
void Fl_Text_Display::linenumber_width(int width) {
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)
- \param buf attach this text buffer
- */
+ 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
+*/
void Fl_Text_Display::buffer( Fl_Text_Buffer *buf ) {
/* If the text display is already displaying a buffer, clear it off
of the display and remove our callback from it */