summaryrefslogtreecommitdiffstats
path: root/tqt/tqextscintilla.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tqt/tqextscintilla.cpp')
-rw-r--r--tqt/tqextscintilla.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/tqt/tqextscintilla.cpp b/tqt/tqextscintilla.cpp
index 3660adc..66dfd71 100644
--- a/tqt/tqextscintilla.cpp
+++ b/tqt/tqextscintilla.cpp
@@ -51,11 +51,11 @@ static const char *defaultWordChars = "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMN
// The ctor.
TQextScintilla::TQextScintilla(TQWidget *parent,const char *name,WFlags f)
: TQextScintillaBase(parent,name,f), allocatedMarkers(0), oldPos(-1),
- selText(FALSE), fold(NoFoldStyle), autoInd(FALSE),
+ selText(false), fold(NoFoldStyle), autoInd(false),
braceMode(NoBraceMatch), acSource(AcsDocument), acThresh(-1),
acStart(""), acAPIs(0), ctAPIs(0), maxCallTips(-1),
- showSingle(FALSE), modified(FALSE), explicit_fillups(FALSE),
- fillups_enabled(FALSE), saved_fillups("")
+ showSingle(false), modified(false), explicit_fillups(false),
+ fillups_enabled(false), saved_fillups("")
{
connect(this,TQ_SIGNAL(SCN_MODIFYATTEMPTRO()),
TQ_SIGNAL(modificationAttempted()));
@@ -212,7 +212,7 @@ void TQextScintilla::handleCharAdded(int ch)
if (isAutoCStartChar(ch))
{
cancelList();
- startAutoCompletion(acSource, FALSE, FALSE);
+ startAutoCompletion(acSource, false, false);
}
return;
@@ -232,9 +232,9 @@ void TQextScintilla::handleCharAdded(int ch)
// See if we might want to start auto-completion.
if (!isCallTipActive())
if (isAutoCStartChar(ch))
- startAutoCompletion(acSource, FALSE, FALSE);
+ startAutoCompletion(acSource, false, false);
else if (acThresh >= 1 && isWordChar(ch))
- startAutoCompletion(acSource, TRUE, FALSE);
+ startAutoCompletion(acSource, true, false);
}
@@ -647,7 +647,7 @@ int TQextScintilla::blockIndent(int line)
}
-// Return TRUE if all characters starting at spos up to, but not including
+// Return true if all characters starting at spos up to, but not including
// epos, are spaces or tabs.
bool TQextScintilla::rangeIsWhitespace(long spos,long epos)
{
@@ -656,12 +656,12 @@ bool TQextScintilla::rangeIsWhitespace(long spos,long epos)
char ch = SendScintilla(SCI_GETCHARAT,spos);
if (ch != ' ' && ch != '\t')
- return FALSE;
+ return false;
++spos;
}
- return TRUE;
+ return true;
}
@@ -777,7 +777,7 @@ int TQextScintilla::findStyledWord(const char *text,int style,const char *words)
}
-// Return TRUE if the code page is UTF8.
+// Return true if the code page is UTF8.
bool TQextScintilla::isUtf8()
{
return (SendScintilla(SCI_GETCODEPAGE) == SC_CP_UTF8);
@@ -1041,7 +1041,7 @@ void TQextScintilla::foldClick(int lineClick,int bstate)
{
// Ensure all children are visible.
SendScintilla(SCI_SETFOLDEXPANDED,lineClick,1);
- foldExpand(lineClick,TRUE,TRUE,100,levelClick);
+ foldExpand(lineClick,true,true,100,levelClick);
}
else if (bstate & ControlButton)
{
@@ -1049,13 +1049,13 @@ void TQextScintilla::foldClick(int lineClick,int bstate)
{
// Contract this line and all its children.
SendScintilla(SCI_SETFOLDEXPANDED,lineClick,0L);
- foldExpand(lineClick,FALSE,TRUE,0,levelClick);
+ foldExpand(lineClick,false,true,0,levelClick);
}
else
{
// Expand this line and all its children.
SendScintilla(SCI_SETFOLDEXPANDED,lineClick,1);
- foldExpand(lineClick,TRUE,TRUE,100,levelClick);
+ foldExpand(lineClick,true,true,100,levelClick);
}
}
else
@@ -1109,10 +1109,10 @@ void TQextScintilla::foldExpand(int &line,bool doExpand,bool force,
if (!SendScintilla(SCI_GETFOLDEXPANDED,line))
SendScintilla(SCI_SETFOLDEXPANDED,line,1);
- foldExpand(line,TRUE,force,visLevels - 1);
+ foldExpand(line,true,force,visLevels - 1);
}
else
- foldExpand(line,FALSE,force,visLevels - 1);
+ foldExpand(line,false,force,visLevels - 1);
}
else
line++;
@@ -1127,7 +1127,7 @@ void TQextScintilla::foldAll(bool children)
recolor();
int maxLine = SendScintilla(SCI_GETLINECOUNT);
- bool expanding = TRUE;
+ bool expanding = true;
for (int lineSeek = 0; lineSeek < maxLine; lineSeek++)
{
@@ -1151,7 +1151,7 @@ void TQextScintilla::foldAll(bool children)
if (expanding)
{
SendScintilla(SCI_SETFOLDEXPANDED,line,1);
- foldExpand(line,TRUE,FALSE,0,level);
+ foldExpand(line,true,false,0,level);
line--;
}
else
@@ -1183,7 +1183,7 @@ void TQextScintilla::foldChanged(int line,int levelNow,int levelPrev)
// Removing the fold from one that has been contracted
// so should expand. Otherwise lines are left
// invisible with no way to make them visible.
- foldExpand(line,TRUE,FALSE,0,levelPrev);
+ foldExpand(line,true,false,0,levelPrev);
}
}
}
@@ -1255,10 +1255,10 @@ bool TQextScintilla::findFirst(const TQString &expr,bool re,bool cs,bool wo,
bool wrap,bool forward,int line,int index,
bool show)
{
- findState.inProgress = FALSE;
+ findState.inProgress = false;
if (expr.isEmpty())
- return FALSE;
+ return false;
findState.expr = expr;
findState.wrap = wrap;
@@ -1288,7 +1288,7 @@ bool TQextScintilla::findFirst(const TQString &expr,bool re,bool cs,bool wo,
bool TQextScintilla::findNext()
{
if (!findState.inProgress)
- return FALSE;
+ return false;
return doFind();
}
@@ -1320,8 +1320,8 @@ bool TQextScintilla::doFind()
if (pos == -1)
{
- findState.inProgress = FALSE;
- return FALSE;
+ findState.inProgress = false;
+ return false;
}
// It was found.
@@ -1348,8 +1348,8 @@ bool TQextScintilla::doFind()
else if ((findState.startpos = targstart - 1) < 0)
findState.startpos = 0;
- findState.inProgress = TRUE;
- return TRUE;
+ findState.inProgress = true;
+ return true;
}
@@ -1453,8 +1453,8 @@ void TQextScintilla::handleSavePointReached()
{
if (modified)
{
- modified = FALSE;
- emit modificationChanged(FALSE);
+ modified = false;
+ emit modificationChanged(false);
}
}
@@ -1464,8 +1464,8 @@ void TQextScintilla::handleSavePointLeft()
{
if (!modified)
{
- modified = TRUE;
- emit modificationChanged(TRUE);
+ modified = true;
+ emit modificationChanged(true);
}
}
@@ -2611,7 +2611,7 @@ long TQextScintilla::checkBrace(long pos,int brace_style,bool &colonMode)
if (!lex.isNull() && strcmp(lex -> lexer(),"python") == 0)
{
brace_pos = pos;
- colonMode = TRUE;
+ colonMode = true;
}
}
else if (ch && strchr("[](){}<>",ch))
@@ -2631,11 +2631,11 @@ long TQextScintilla::checkBrace(long pos,int brace_style,bool &colonMode)
}
-// Find a brace and it's match. Return TRUE if the current position is inside
+// Find a brace and it's match. Return true if the current position is inside
// a pair of braces.
bool TQextScintilla::findMatchingBrace(long &brace,long &other,BraceMatch mode)
{
- bool colonMode = FALSE;
+ bool colonMode = false;
int brace_style = (lex.isNull() ? -1 : lex -> braceStyle());
brace = -1;
@@ -2646,14 +2646,14 @@ bool TQextScintilla::findMatchingBrace(long &brace,long &other,BraceMatch mode)
if (caretPos > 0)
brace = checkBrace(caretPos - 1,brace_style,colonMode);
- bool isInside = FALSE;
+ bool isInside = false;
if (brace < 0 && mode == SloppyBraceMatch)
{
brace = checkBrace(caretPos,brace_style,colonMode);
if (brace >= 0 && !colonMode)
- isInside = TRUE;
+ isInside = true;
}
if (brace >= 0)
@@ -2680,14 +2680,14 @@ bool TQextScintilla::findMatchingBrace(long &brace,long &other,BraceMatch mode)
// Move to the matching brace.
void TQextScintilla::moveToMatchingBrace()
{
- gotoMatchingBrace(FALSE);
+ gotoMatchingBrace(false);
}
// Select to the matching brace.
void TQextScintilla::selectToMatchingBrace()
{
- gotoMatchingBrace(TRUE);
+ gotoMatchingBrace(true);
}
@@ -2798,14 +2798,14 @@ void TQextScintilla::setAutoCompletionAPIs(TQextScintillaAPIs *apis)
// Explicitly auto-complete from all sources.
void TQextScintilla::autoCompleteFromAll()
{
- startAutoCompletion(AcsAll, FALSE, showSingle);
+ startAutoCompletion(AcsAll, false, showSingle);
}
// Explicitly auto-complete from the APIs.
void TQextScintilla::autoCompleteFromAPIs()
{
- startAutoCompletion(AcsAPIs, FALSE, showSingle);
+ startAutoCompletion(AcsAPIs, false, showSingle);
}
@@ -2814,18 +2814,18 @@ void TQextScintilla::autoCompleteFromDocument()
{
// If we are not in a word then ignore.
if (currentCharInWord())
- startAutoCompletion(AcsDocument, FALSE, showSingle);
+ startAutoCompletion(AcsDocument, false, showSingle);
}
-// Return TRUE if the current character (ie. the one before the carat) is part
+// Return true if the current character (ie. the one before the carat) is part
// of a word.
bool TQextScintilla::currentCharInWord()
{
long pos = SendScintilla(SCI_GETCURRENTPOS);
if (pos <= 0)
- return FALSE;
+ return false;
return isWordChar(SendScintilla(SCI_GETCHARAT,pos - 1));
}
@@ -2874,7 +2874,7 @@ void TQextScintilla::setAutoCompletionFillups(const char *fillups)
fillups = "";
SendScintilla(SCI_AUTOCSETFILLUPS, fillups);
- fillups_enabled = explicit_fillups = TRUE;
+ fillups_enabled = explicit_fillups = true;
// Save them in case we need to reenable them at some point.
saved_fillups = fillups;
@@ -2979,7 +2979,7 @@ bool TQextScintilla::ensureRW()
bool ro = isReadOnly();
if (ro)
- setReadOnly(FALSE);
+ setReadOnly(false);
return ro;
}