summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFabien Costantini <fabien@onepost.net>2009-07-03 23:54:34 +0000
committerFabien Costantini <fabien@onepost.net>2009-07-03 23:54:34 +0000
commite982ba24a9e7b3cf7730101a872e250c6ade91bd (patch)
tree2c7b30be0ed90350b6c7dc7e93e5f09b35594892 /src
parentd4e85cef93dac1fee682804f82e77fec86e6e589 (diff)
UTF8: Fl_Text_Display and related:
+ Added more const constraints to Fl_Text_Selection and Fl_Text_Buffer methods. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6819 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Text_Buffer.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/Fl_Text_Buffer.cxx b/src/Fl_Text_Buffer.cxx
index a6fce80a4..dc19517d1 100644
--- a/src/Fl_Text_Buffer.cxx
+++ b/src/Fl_Text_Buffer.cxx
@@ -202,7 +202,7 @@ void Fl_Text_Buffer::text(const char *t) {
include the character pointed to by \p end.
When you are done with the text, free it using the free() function.
*/
-char * Fl_Text_Buffer::text_range(int start, int end) {
+char * Fl_Text_Buffer::text_range(int start, int end) const {
char * s = NULL;
int copiedLength, part1Length;
@@ -239,7 +239,7 @@ char * Fl_Text_Buffer::text_range(int start, int end) {
/** Returns the character at the specified position pos in the buffer.
Positions start at 0 */
-char Fl_Text_Buffer::character(int pos) {
+char Fl_Text_Buffer::character(int pos) const {
if (pos < 0 || pos >= mLength)
return '\0';
if (pos < mGapStart)
@@ -1177,7 +1177,7 @@ int Fl_Text_Buffer::rewind_lines(int startPos, int nLines) {
returns 1 if found, 0 if not.
*/
int Fl_Text_Buffer::search_forward(int startPos, const char *searchString,
- int *foundPos, int matchCase)
+ int *foundPos, int matchCase) const
{
if (!searchString) return 0;
int bp;
@@ -1201,7 +1201,7 @@ int Fl_Text_Buffer::search_forward(int startPos, const char *searchString,
returns 1 if found, 0 if not.
*/
int Fl_Text_Buffer::search_backward(int startPos, const char *searchString,
- int *foundPos, int matchCase)
+ int *foundPos, int matchCase) const
{
if (!searchString) return 0;
int bp;
@@ -1226,7 +1226,7 @@ int Fl_Text_Buffer::search_backward(int startPos, const char *searchString,
returns 1 if found, 0 if not.
*/
int Fl_Text_Buffer::findchars_forward(int startPos, const char *searchChars,
- int *foundPos) {
+ int *foundPos) const {
int pos, gapLen = mGapEnd - mGapStart;
const char *c;
@@ -1260,7 +1260,7 @@ int Fl_Text_Buffer::findchars_forward(int startPos, const char *searchChars,
returns 1 if found, 0 if not.
*/
int Fl_Text_Buffer::findchars_backward(int startPos, const char *searchChars,
- int *foundPos) {
+ int *foundPos) const {
int pos, gapLen = mGapEnd - mGapStart;
const char *c;
@@ -1975,7 +1975,7 @@ void Fl_Text_Selection::set_rectangular(int startpos, int endpos,
mRectEnd = rectEnd;
}
-int Fl_Text_Selection::position(int *startpos, int *endpos) {
+int Fl_Text_Selection::position(int *startpos, int *endpos) const {
if (!mSelected)
return 0;
*startpos = mStart;
@@ -1985,7 +1985,7 @@ int Fl_Text_Selection::position(int *startpos, int *endpos) {
}
int Fl_Text_Selection::position(int *startpos, int *endpos,
- int *isRect, int *rectStart, int *rectEnd) {
+ int *isRect, int *rectStart, int *rectEnd) const {
if (!mSelected)
return 0;
*isRect = mRectangular;
@@ -2002,7 +2002,7 @@ int Fl_Text_Selection::position(int *startpos, int *endpos,
Return true if position \p pos with indentation \p dispIndex is in
the Fl_Text_Selection.
*/
-int Fl_Text_Selection::includes(int pos, int lineStartPos, int dispIndex) {
+int Fl_Text_Selection::includes(int pos, int lineStartPos, int dispIndex) const {
return selected() &&
((!rectangular() && pos >= start() && pos < end()) ||
(rectangular() && pos >= start() && lineStartPos <= end() &&
@@ -2272,7 +2272,7 @@ void Fl_Text_Selection::update(int pos, int nDeleted,
count lines quickly, hence searching for a single character: newline)
*/
int Fl_Text_Buffer::findchar_forward(int startPos, char searchChar,
- int *foundPos) {
+ int *foundPos) const {
int pos, gapLen = mGapEnd - mGapStart;
if (startPos < 0 || startPos >= mLength) {
@@ -2308,7 +2308,7 @@ int Fl_Text_Buffer::findchar_forward(int startPos, char searchChar,
count lines quickly, hence searching for a single character: newline)
*/
int Fl_Text_Buffer::findchar_backward(int startPos, char searchChar,
- int *foundPos) {
+ int *foundPos) const{
int pos, gapLen = mGapEnd - mGapStart;
if (startPos <= 0 || startPos > mLength) {