• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kate
 

kate

KateAutoIndent Class Reference

Provides Auto-Indent functionality for katepart. More...

#include <kateautoindent.h>

Inheritance diagram for KateAutoIndent:
TQObject KateNormalIndent KateVarIndent

List of all members.

Public Slots

virtual void updateConfig ()

Public Member Functions

 KateAutoIndent (KateDocument *doc)
virtual ~KateAutoIndent ()
virtual bool canProcessNewLine () const
virtual void processNewline (KateDocCursor &cur, bool needContinue)
virtual void processChar (TQChar c)
virtual void processLine (KateDocCursor &)
virtual void processSection (const KateDocCursor &, const KateDocCursor &)
virtual bool canProcessLine () const
virtual uint modeNumber () const

Static Public Member Functions

static KateAutoIndent * createIndenter (KateDocument *doc, uint mode)
static TQStringList listModes ()
static TQString modeName (uint mode)
static TQString modeDescription (uint mode)
static uint modeNumber (const TQString &name)
static bool hasConfigPage (uint mode)
static IndenterConfigPage * configPage (TQWidget *parent, uint mode)

Protected Attributes

KateDocument * doc

Detailed Description

Provides Auto-Indent functionality for katepart.

This baseclass is a real dummy, does nothing beside remembering the document it belongs too, only to have the object around

Definition at line 70 of file kateautoindent.h.


Constructor & Destructor Documentation

KateAutoIndent::KateAutoIndent ( KateDocument *  doc  ) 

Constructor.

Parameters:
doc parent document

Definition at line 150 of file kateautoindent.cpp.

KateAutoIndent::~KateAutoIndent (  )  [virtual]

Virtual Destructor for the baseclass.

Definition at line 154 of file kateautoindent.cpp.


Member Function Documentation

virtual bool KateAutoIndent::canProcessLine (  )  const [inline, virtual]

Set to true if an actual implementation of 'processLine' is present.

This is used to prevent a needless Undo action from being created.

Reimplemented in KateNormalIndent, and KateVarIndent.

Definition at line 179 of file kateautoindent.h.

virtual bool KateAutoIndent::canProcessNewLine (  )  const [inline, virtual]

does this indenter support processNewLine

Returns:
can you do it?

Reimplemented in KateNormalIndent.

Definition at line 149 of file kateautoindent.h.

IndenterConfigPage * KateAutoIndent::configPage ( TQWidget *  parent,
uint  mode 
) [static]

Support for a config page.

Returns:
config page or 0 if not available.

Definition at line 142 of file kateautoindent.cpp.

KateAutoIndent * KateAutoIndent::createIndenter ( KateDocument *  doc,
uint  mode 
) [static]

Static methods to create and list indention modes.

Create an indenter

Parameters:
doc document for the indenter
mode indention mode wanted
Returns:
created autoindention object

Definition at line 38 of file kateautoindent.cpp.

bool KateAutoIndent::hasConfigPage ( uint  mode  )  [static]

Config page support.

Parameters:
mode mode index
Returns:
true, if the indenter mode has a configuration page

Definition at line 134 of file kateautoindent.cpp.

TQStringList KateAutoIndent::listModes (  )  [static]

List all possible modes by name.

Returns:
list of modes

Definition at line 58 of file kateautoindent.cpp.

TQString KateAutoIndent::modeDescription ( uint  mode  )  [static]

Return the mode description.

Parameters:
mode mode index
Returns:
mode index

Definition at line 94 of file kateautoindent.cpp.

TQString KateAutoIndent::modeName ( uint  mode  )  [static]

Return the mode name given the mode.

Parameters:
mode mode index
Returns:
name for this mode index

Definition at line 74 of file kateautoindent.cpp.

virtual uint KateAutoIndent::modeNumber (  )  const [inline, virtual]

Mode index of this mode.

Returns:
modeNumber

Reimplemented in KateNormalIndent, and KateVarIndent.

Definition at line 185 of file kateautoindent.h.

uint KateAutoIndent::modeNumber ( const TQString &  name  )  [static]

Maps name -> index.

Parameters:
name mode name
Returns:
mode index

Definition at line 114 of file kateautoindent.cpp.

virtual void KateAutoIndent::processChar ( TQChar  c  )  [inline, virtual]

Called every time a character is inserted into the document.

Parameters:
c character inserted

Reimplemented in KateNormalIndent, and KateVarIndent.

Definition at line 163 of file kateautoindent.h.

virtual void KateAutoIndent::processLine ( KateDocCursor &   )  [inline, virtual]

Aligns/indents the given line to the proper indent position.

Reimplemented in KateNormalIndent, and KateVarIndent.

Definition at line 168 of file kateautoindent.h.

virtual void KateAutoIndent::processNewline ( KateDocCursor &  cur,
bool  needContinue 
) [inline, virtual]

Called every time a newline character is inserted in the document.

Parameters:
cur The position to start processing. Contains the new cursor position after the indention.
needContinue Used to determine whether to calculate a continue indent or not.

Reimplemented in KateNormalIndent, and KateVarIndent.

Definition at line 157 of file kateautoindent.h.

virtual void KateAutoIndent::processSection ( const KateDocCursor &  ,
const KateDocCursor &   
) [inline, virtual]

Processes a section of text, indenting each line in between.

Reimplemented in KateNormalIndent, and KateVarIndent.

Definition at line 173 of file kateautoindent.h.

virtual void KateAutoIndent::updateConfig (  )  [inline, virtual, slot]

Update indenter's configuration (indention width, attributes etc.

)

Reimplemented in KateNormalIndent.

Definition at line 142 of file kateautoindent.h.


The documentation for this class was generated from the following files:
  • kateautoindent.h
  • kateautoindent.cpp

kate

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

kate

Skip menu "kate"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for kate by doxygen 1.6.3
This website is maintained by Timothy Pearson.