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

kate

Public Slots | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
KateAutoIndent Class Reference

#include <kateautoindent.h>

Inheritance diagram for KateAutoIndent:
KateNormalIndent KateVarIndent

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::KateAutoIndent ( KateDocument *  doc)

Constructor.

Parameters
docparent document

Definition at line 150 of file kateautoindent.cpp.

◆ ~KateAutoIndent()

KateAutoIndent::~KateAutoIndent ( )
virtual

Virtual Destructor for the baseclass.

Definition at line 154 of file kateautoindent.cpp.

Member Function Documentation

◆ canProcessLine()

virtual bool KateAutoIndent::canProcessLine ( ) const
inlinevirtual

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.

◆ canProcessNewLine()

virtual bool KateAutoIndent::canProcessNewLine ( ) const
inlinevirtual

does this indenter support processNewLine

Returns
can you do it?

Reimplemented in KateNormalIndent.

Definition at line 149 of file kateautoindent.h.

◆ configPage()

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.

◆ createIndenter()

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

Static methods to create and list indention modes.

Create an indenter

Parameters
docdocument for the indenter
modeindention mode wanted
Returns
created autoindention object

Definition at line 38 of file kateautoindent.cpp.

◆ hasConfigPage()

bool KateAutoIndent::hasConfigPage ( uint  mode)
static

Config page support.

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

Definition at line 134 of file kateautoindent.cpp.

◆ listModes()

TQStringList KateAutoIndent::listModes ( )
static

List all possible modes by name.

Returns
list of modes

Definition at line 58 of file kateautoindent.cpp.

◆ modeDescription()

TQString KateAutoIndent::modeDescription ( uint  mode)
static

Return the mode description.

Parameters
modemode index
Returns
mode index

Definition at line 94 of file kateautoindent.cpp.

◆ modeName()

TQString KateAutoIndent::modeName ( uint  mode)
static

Return the mode name given the mode.

Parameters
modemode index
Returns
name for this mode index

Definition at line 74 of file kateautoindent.cpp.

◆ modeNumber() [1/2]

virtual uint KateAutoIndent::modeNumber ( ) const
inlinevirtual

Mode index of this mode.

Returns
modeNumber

Reimplemented in KateNormalIndent, and KateVarIndent.

Definition at line 185 of file kateautoindent.h.

◆ modeNumber() [2/2]

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

Maps name -> index.

Parameters
namemode name
Returns
mode index

Definition at line 114 of file kateautoindent.cpp.

◆ processChar()

virtual void KateAutoIndent::processChar ( TQChar  c)
inlinevirtual

Called every time a character is inserted into the document.

Parameters
ccharacter inserted

Reimplemented in KateNormalIndent, and KateVarIndent.

Definition at line 163 of file kateautoindent.h.

◆ processLine()

virtual void KateAutoIndent::processLine ( KateDocCursor &  )
inlinevirtual

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

Reimplemented in KateNormalIndent, and KateVarIndent.

Definition at line 168 of file kateautoindent.h.

◆ processNewline()

virtual void KateAutoIndent::processNewline ( KateDocCursor &  cur,
bool  needContinue 
)
inlinevirtual

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

Parameters
curThe position to start processing. Contains the new cursor position after the indention.
needContinueUsed to determine whether to calculate a continue indent or not.

Reimplemented in KateNormalIndent, and KateVarIndent.

Definition at line 157 of file kateautoindent.h.

◆ processSection()

virtual void KateAutoIndent::processSection ( const KateDocCursor &  ,
const KateDocCursor &   
)
inlinevirtual

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

Reimplemented in KateNormalIndent, and KateVarIndent.

Definition at line 173 of file kateautoindent.h.

◆ updateConfig

virtual void KateAutoIndent::updateConfig ( )
inlinevirtualslot

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

Definition at line 142 of file kateautoindent.h.

Member Data Documentation

◆ doc

KateDocument* KateAutoIndent::doc
protected

Definition at line 188 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.9.4
This website is maintained by Timothy Pearson.