summaryrefslogtreecommitdiff
path: root/FL/Fl_Text_Buffer.H
diff options
context:
space:
mode:
Diffstat (limited to 'FL/Fl_Text_Buffer.H')
-rw-r--r--FL/Fl_Text_Buffer.H25
1 files changed, 13 insertions, 12 deletions
diff --git a/FL/Fl_Text_Buffer.H b/FL/Fl_Text_Buffer.H
index c23a4a4e7..d74582deb 100644
--- a/FL/Fl_Text_Buffer.H
+++ b/FL/Fl_Text_Buffer.H
@@ -248,6 +248,18 @@ public:
*/
unsigned int character(int pos) const;
+ /**
+ Convert a byte offset in buffer into a memory address.
+ */
+ 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; }
+
/**
Returns the text from the given rectangle. When you are done
with the text, free it using the free() function.
@@ -681,6 +693,7 @@ public:
\return number of byte in substitution
*/
static int character_width(const char *src, int indent, int tabDist);
+ static int character_width(const char c, int indent, int tabDist);
/**
Count the number of displayed characters between buffer position
@@ -934,18 +947,6 @@ protected:
*/
void update_selections(int pos, int nDeleted, int nInserted);
- /**
- Convert a byte offset in buffer into a memory address.
- */
- 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; }
-
Fl_Text_Selection mPrimary; /**< highlighted areas */
Fl_Text_Selection mSecondary; /**< highlighted areas */
Fl_Text_Selection mHighlight; /**< highlighted areas */