summaryrefslogtreecommitdiffstats
path: root/src/kernel/tqrichtext_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/tqrichtext_p.h')
-rw-r--r--src/kernel/tqrichtext_p.h74
1 files changed, 37 insertions, 37 deletions
diff --git a/src/kernel/tqrichtext_p.h b/src/kernel/tqrichtext_p.h
index 11dfcc6d1..2d75c779b 100644
--- a/src/kernel/tqrichtext_p.h
+++ b/src/kernel/tqrichtext_p.h
@@ -103,7 +103,7 @@ class TQ_EXPORT TQTextStringChar
public:
// this is never called, initialize variables in TQTextString::insert()!!!
- TQTextStringChar() : nobreak(FALSE), lineStart( 0 ), type( Regular ) {d.format=0;}
+ TQTextStringChar() : nobreak(false), lineStart( 0 ), type( Regular ) {d.format=0;}
~TQTextStringChar();
struct CustomData
@@ -195,7 +195,7 @@ public:
void insert( int index, const TQString &s, TQTextFormat *f );
void insert( int index, const TQChar *unicode, int len, TQTextFormat *f );
- void insert( int index, TQTextStringChar *c, bool doAddRefFormat = FALSE );
+ void insert( int index, TQTextStringChar *c, bool doAddRefFormat = false );
void truncate( int index );
void remove( int index, int len );
void clear();
@@ -206,7 +206,7 @@ public:
bool isBidi() const;
bool isRightToLeft() const;
TQChar::Direction direction() const;
- void setDirection( TQChar::Direction d ) { dir = d; bidiDirty = TRUE; }
+ void setDirection( TQChar::Direction d ) { dir = d; bidiDirty = true; }
TQMemArray<TQTextStringChar> rawData() const { return data.copy(); }
@@ -338,13 +338,13 @@ public:
void gotoEnd();
void gotoPageUp( int visibleHeight );
void gotoPageDown( int visibleHeight );
- void gotoNextWord( bool onlySpace = FALSE );
- void gotoPreviousWord( bool onlySpace = FALSE );
+ void gotoNextWord( bool onlySpace = false );
+ void gotoPreviousWord( bool onlySpace = false );
void gotoWordLeft();
void gotoWordRight();
void insert( const TQString &s, bool checkNewLine, TQMemArray<TQTextStringChar> *formatting = 0 );
- void splitAndInsertEmptyParagraph( bool ind = TRUE, bool updateIds = TRUE );
+ void splitAndInsertEmptyParagraph( bool ind = true, bool updateIds = true );
bool remove();
bool removePreviousChar();
void indent();
@@ -364,8 +364,8 @@ public:
int totalOffsetX() const; // total document offset
int totalOffsetY() const; // total document offset
- bool place( const TQPoint &pos, TQTextParagraph *s ) { return place( pos, s, FALSE ); }
- bool place( const TQPoint &pos, TQTextParagraph *s, bool link ) { return place( pos, s, link, TRUE, TRUE ); }
+ bool place( const TQPoint &pos, TQTextParagraph *s ) { return place( pos, s, false ); }
+ bool place( const TQPoint &pos, TQTextParagraph *s, bool link ) { return place( pos, s, link, true, true ); }
bool place( const TQPoint &pos, TQTextParagraph *s, bool link, bool loosePlacing, bool matchBetweenCharacters );
void restoreState();
@@ -426,7 +426,7 @@ Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrList<TQTextCommand>;
class TQ_EXPORT TQTextCommandHistory
{
public:
- TQTextCommandHistory( int s ) : current( -1 ), steps( s ) { history.setAutoDelete( TRUE ); }
+ TQTextCommandHistory( int s ) : current( -1 ), steps( s ) { history.setAutoDelete( true ); }
virtual ~TQTextCommandHistory();
void clear() { history.clear(); current = -1; }
@@ -490,7 +490,7 @@ public:
TQRect geometry() const { return TQRect( xpos, ypos, width, height ); }
- virtual bool enter( TQTextCursor *, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy, bool atEnd = FALSE );
+ virtual bool enter( TQTextCursor *, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy, bool atEnd = false );
virtual bool enterAt( TQTextCursor *, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy, const TQPoint & );
virtual bool next( TQTextCursor *, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy );
virtual bool prev( TQTextCursor *, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy );
@@ -552,7 +552,7 @@ public:
void draw(TQPainter* p, int x, int y, int cx, int cy, int cw, int ch, const TQColorGroup& cg, bool selected );
TQString richText() const;
- bool ownLine() const { return TRUE; }
+ bool ownLine() const { return true; }
private:
int tmpheight;
@@ -702,14 +702,14 @@ public:
void draw( TQPainter* p, int x, int y, int cx, int cy, int cw, int ch,
const TQColorGroup& cg, bool selected );
- bool noErase() const { return TRUE; }
- bool ownLine() const { return TRUE; }
+ bool noErase() const { return true; }
+ bool ownLine() const { return true; }
Placement placement() const { return place; }
- bool isNested() const { return TRUE; }
+ bool isNested() const { return true; }
void resize( int nwidth );
virtual void invalidate();
- virtual bool enter( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy, bool atEnd = FALSE );
+ virtual bool enter( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy, bool atEnd = false );
virtual bool enterAt( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy, const TQPoint &pos );
virtual bool next( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy );
virtual bool prev( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy );
@@ -843,7 +843,7 @@ public:
bool invertSelectionText( int id ) const;
void setSelectionColor( int id, const TQColor &c );
void setInvertSelectionText( int id, bool b );
- bool hasSelection( int id, bool visible = FALSE ) const;
+ bool hasSelection( int id, bool visible = false ) const;
void setSelectionStart( int id, const TQTextCursor &cursor );
bool setSelectionEnd( int id, const TQTextCursor &cursor );
void selectAll( int id );
@@ -856,7 +856,7 @@ public:
int numSelections() const { return nSelections; }
void addSelection( int id );
- TQString selectedText( int id, bool asRichText = FALSE ) const;
+ TQString selectedText( int id, bool asRichText = false ) const;
void removeSelectedText( int id, TQTextCursor *cursor );
void indentSelection( int id );
@@ -901,10 +901,10 @@ public:
void drawParagraph( TQPainter *p, TQTextParagraph *parag, int cx, int cy, int cw, int ch,
TQPixmap *&doubleBuffer, const TQColorGroup &cg,
- bool drawCursor, TQTextCursor *cursor, bool resetChanged = TRUE );
+ bool drawCursor, TQTextCursor *cursor, bool resetChanged = true );
TQTextParagraph *draw( TQPainter *p, int cx, int cy, int cw, int ch, const TQColorGroup &cg,
- bool onlyChanged = FALSE, bool drawCursor = FALSE, TQTextCursor *cursor = 0,
- bool resetChanged = TRUE );
+ bool onlyChanged = false, bool drawCursor = false, TQTextCursor *cursor = 0,
+ bool resetChanged = true );
#ifndef TQT_NO_TEXTCUSTOMITEM
void registerCustomItem( TQTextCustomItem *i, TQTextParagraph *p );
@@ -944,9 +944,9 @@ public:
int undoDepth() const { return commandHistory->undoDepth(); }
int length() const;
- void clear( bool createEmptyParag = FALSE );
+ void clear( bool createEmptyParag = false );
- virtual TQTextParagraph *createParagraph( TQTextDocument *d, TQTextParagraph *pr = 0, TQTextParagraph *nx = 0, bool updateIds = TRUE );
+ virtual TQTextParagraph *createParagraph( TQTextDocument *d, TQTextParagraph *pr = 0, TQTextParagraph *nx = 0, bool updateIds = true );
void insertChild( TQObject *o ) { TQObject::insertChild( o ); }
void removeChild( TQObject *o ) { TQObject::removeChild( o ); }
void insertChild( TQTextDocument *d ) { childList.append( d ); }
@@ -957,7 +957,7 @@ public:
TQString focusHref() const;
TQString focusName() const;
- void invalidateOriginalText() { oTextValid = FALSE; oText = ""; }
+ void invalidateOriginalText() { oTextValid = false; oText = ""; }
signals:
void minimumWidthChanged( int );
@@ -972,12 +972,12 @@ private:
TQTextCustomItem* parseTable( const TQMap<TQString, TQString> &attr, const TQTextFormat &fmt,
const TQChar* doc, int length, int& pos, TQTextParagraph *curpar );
#endif
- bool eatSpace(const TQChar* doc, int length, int& pos, bool includeNbsp = FALSE );
+ bool eatSpace(const TQChar* doc, int length, int& pos, bool includeNbsp = false );
bool eat(const TQChar* doc, int length, int& pos, TQChar c);
TQString parseOpenTag(const TQChar* doc, int length, int& pos, TQMap<TQString, TQString> &attr, bool& emptyTag);
TQString parseCloseTag( const TQChar* doc, int length, int& pos );
TQChar parseHTMLSpecialChar(const TQChar* doc, int length, int& pos);
- TQString parseWord(const TQChar* doc, int length, int& pos, bool lower = TRUE);
+ TQString parseWord(const TQChar* doc, int length, int& pos, bool lower = true);
TQChar parseChar(const TQChar* doc, int length, int& pos, TQStyleSheetItem::WhiteSpaceMode wsm );
void setRichTextInternal( const TQString &text, TQTextCursor* cursor = 0, const TQTextFormat *initialFormat = 0 );
void setRichTextMarginsInternal( TQPtrList< TQPtrVector<TQStyleSheetItem> >& styles, TQTextParagraph* stylesPar );
@@ -1170,7 +1170,7 @@ class TQ_EXPORT TQTextParagraph
friend class TQSyntaxHighlighter;
public:
- TQTextParagraph( TQTextDocument *d, TQTextParagraph *pr = 0, TQTextParagraph *nx = 0, bool updateIds = TRUE );
+ TQTextParagraph( TQTextDocument *d, TQTextParagraph *pr = 0, TQTextParagraph *nx = 0, bool updateIds = true );
~TQTextParagraph();
TQTextString *string() const;
@@ -1178,7 +1178,7 @@ public:
int leftGap() const;
int length() const; // maybe remove later
- void setListStyle( TQStyleSheetItem::ListStyle ls ) { lstyle = ls; changed = TRUE; }
+ void setListStyle( TQStyleSheetItem::ListStyle ls ) { lstyle = ls; changed = true; }
TQStyleSheetItem::ListStyle listStyle() const { return (TQStyleSheetItem::ListStyle)lstyle; }
void setListItem( bool li );
bool isListItem() const { return litem; }
@@ -1210,7 +1210,7 @@ public:
void insert( int index, const TQString &s );
void insert( int index, const TQChar *unicode, int len );
- void append( const TQString &s, bool reallyAtEnd = FALSE );
+ void append( const TQString &s, bool reallyAtEnd = false );
void truncate( int index );
void remove( int index, int len );
void join( TQTextParagraph *s );
@@ -1218,11 +1218,11 @@ public:
void invalidate( int chr );
void move( int &dy );
- void format( int start = -1, bool doMove = TRUE );
+ void format( int start = -1, bool doMove = true );
bool isValid() const;
bool hasChanged() const;
- void setChanged( bool b, bool recursive = FALSE );
+ void setChanged( bool b, bool recursive = false );
int lineHeightOfChar( int i, int *bl = 0, int *y = 0 ) const;
TQTextStringChar *lineStartOfChar( int i, int *index = 0, int *line = 0 ) const;
@@ -1257,12 +1257,12 @@ public:
TQMap<int, TQTextLineStart*> &lineStartList();
- void setFormat( int index, int len, TQTextFormat *f, bool useCollection = TRUE, int flags = -1 );
+ void setFormat( int index, int len, TQTextFormat *f, bool useCollection = true, int flags = -1 );
void setAlignment( int a );
int alignment() const;
- void paint( TQPainter &painter, const TQColorGroup &cg, TQTextCursor *cursor = 0, bool drawSelections = FALSE,
+ void paint( TQPainter &painter, const TQColorGroup &cg, TQTextCursor *cursor = 0, bool drawSelections = false,
int clipx = -1, int clipy = -1, int clipw = -1, int cliph = -1 );
int topMargin() const;
@@ -1392,7 +1392,7 @@ public:
virtual int format( TQTextDocument *doc, TQTextParagraph *parag, int start, const TQMap<int, TQTextLineStart*> &oldLineStarts ) = 0;
virtual int formatVertically( TQTextDocument* doc, TQTextParagraph* parag );
- bool isWrapEnabled( TQTextParagraph *p ) const { if ( !wrapEnabled ) return FALSE; if ( p && !p->isBreakable() ) return FALSE; return TRUE;}
+ bool isWrapEnabled( TQTextParagraph *p ) const { if ( !wrapEnabled ) return false; if ( p && !p->isBreakable() ) return false; return true;}
int wrapAtColumn() const { return wrapColumn;}
virtual void setWrapEnabled( bool b );
virtual void setWrapAtColumn( int c );
@@ -1474,7 +1474,7 @@ public:
TQTextPreProcessor();
virtual ~TQTextPreProcessor() {}
- virtual void process( TQTextDocument *doc, TQTextParagraph *, int, bool = TRUE ) = 0;
+ virtual void process( TQTextDocument *doc, TQTextParagraph *, int, bool = true ) = 0;
virtual TQTextFormat *format( int id ) = 0;
};
@@ -1931,12 +1931,12 @@ inline void TQTextParagraph::setBackgroundColor( const TQColor & c )
{
delete bgcol;
bgcol = new TQColor( c );
- setChanged( TRUE );
+ setChanged( true );
}
inline void TQTextParagraph::clearBackgroundColor()
{
- delete bgcol; bgcol = 0; setChanged( TRUE );
+ delete bgcol; bgcol = 0; setChanged( true );
}
inline void TQTextParagraph::append( const TQString &s, bool reallyAtEnd )
@@ -1959,7 +1959,7 @@ inline TQTextParagraph *TQTextParagraph::next() const
inline bool TQTextParagraph::hasAnySelection() const
{
- return mSelections ? !selections().isEmpty() : FALSE;
+ return mSelections ? !selections().isEmpty() : false;
}
inline void TQTextParagraph::setEndState( int s )