• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

Kate

kateautoindent.cpp File Reference

#include "kateautoindent.h"
#include "kateautoindent.moc"
#include "kateconfig.h"
#include "katehighlight.h"
#include "katefactory.h"
#include "katejscript.h"
#include "kateview.h"
#include <klocale.h>
#include <kdebug.h>
#include <kpopupmenu.h>
#include <cctype>
#include <qlabel.h>

Include dependency graph for kateautoindent.cpp:

Go to the source code of this file.


Defines

#define ARRLEN(array)   ( sizeof(array)/sizeof(array[0]) )
#define ISCOMMENT   (ISCOMMENTATTR(ktl->attribute(ktl->firstChar()))||ISCOMMENTATTR(ktl->attribute(matchpos)))
#define ISCOMMENTATTR(attr)   (attr==commentAttrib||attr==doxyCommentAttrib)

Functions

static bool colonPermitsReindent (const KateNormalIndent &indenter, const KateTextLine::Ptr &line, int curCol)
static QString initialWhitespace (const KateTextLine::Ptr &line, int chars, bool convert=true)
static bool isColonImmune (const KateNormalIndent &indenter, uchar attr1, uchar attr2, QChar prev1, QChar prev2)
template<class T >
T min (T a, T b)

Define Documentation

#define ARRLEN ( array   )     ( sizeof(array)/sizeof(array[0]) )

#define ISCOMMENT   (ISCOMMENTATTR(ktl->attribute(ktl->firstChar()))||ISCOMMENTATTR(ktl->attribute(matchpos)))

#define ISCOMMENTATTR ( attr   )     (attr==commentAttrib||attr==doxyCommentAttrib)


Function Documentation

static bool colonPermitsReindent ( const KateNormalIndent &  indenter,
const KateTextLine::Ptr &  line,
int  curCol 
) [inline, static]

Returns true when the colon is allowed to reindent the current line.

Parameters:
indenter current indenter
line current line
curCol column of most recently input character

Definition at line 696 of file kateautoindent.cpp.

static QString initialWhitespace ( const KateTextLine::Ptr &  line,
int  chars,
bool  convert = true 
) [static]

Returns the first chars characters of line, converted to whitespace.

If convert is set to false, characters at and after the first non-whitespace character are removed, not converted.

Definition at line 1580 of file kateautoindent.cpp.

static bool isColonImmune ( const KateNormalIndent &  indenter,
uchar  attr1,
uchar  attr2,
QChar  prev1,
QChar  prev2 
) [inline, static]

Returns true when the given attribute matches any "colon influence immune" attribute.

Parameters:
indenter indenter
attr1 attribute of previous char
attr2 attribute of char preceding previous char
prev1 previous character (0 if none)
prev2 character preceding previous character (0 if none)

Definition at line 676 of file kateautoindent.cpp.

template<class T >
T min ( T  a,
T  b 
) [inline]

Definition at line 1754 of file kateautoindent.cpp.

Kate

Skip menu "Kate"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal