diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2010-04-05 22:26:29 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2010-04-05 22:26:29 +0000 |
| commit | 2bf6fa6074303c8c7bcd16736be6e244dcaf3c39 (patch) | |
| tree | 6d4e263d4f72c8d02a73d9f9861805a7520c9198 /FL | |
| parent | 61cf49ddfce0cbf26a769928df9be7093ed88366 (diff) | |
A few more comments.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7450 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl_Text_Buffer.H | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/FL/Fl_Text_Buffer.H b/FL/Fl_Text_Buffer.H index f5736aa8b..cbf25f525 100644 --- a/FL/Fl_Text_Buffer.H +++ b/FL/Fl_Text_Buffer.H @@ -411,7 +411,6 @@ public: /** Returns a non 0 value if text has been selected, 0 otherwise - \todo unicode check */ int selected() const { return mPrimary.selected(); } @@ -468,7 +467,6 @@ public: /** Returns a non 0 value if text has been selected in the secondary text selection, 0 otherwise - \todo unicode check */ int secondary_selected() { return mSecondary.selected(); } @@ -527,7 +525,6 @@ public: /** Returns the highlighted text. When you are done with the text, free it using the free() function. - \todo unicode check */ int highlight() { return mHighlight.selected(); } @@ -786,25 +783,21 @@ public: /** Returns the primary selection. - \todo unicode check */ const Fl_Text_Selection* primary_selection() const { return &mPrimary; } /** Returns the primary selection. - \todo unicode check */ Fl_Text_Selection* primary_selection() { return &mPrimary; } /** Returns the secondary selection. - \todo unicode check */ const Fl_Text_Selection* secondary_selection() const { return &mSecondary; } /** Returns the current highlight selection. - \todo unicode check */ const Fl_Text_Selection* highlight_selection() const { return &mHighlight; } @@ -944,6 +937,10 @@ protected: */ const char *address(int pos) const { return (pos < mGapStart) ? mBuf+pos : mBuf+pos+mGapEnd-mGapStart; } + + /** + Convert a byte offset in buffer into a memory address. + */ char *address(int pos) { return (pos < mGapStart) ? mBuf+pos : mBuf+pos+mGapEnd-mGapStart; } |
