Skip to content
Skip to link menu
Trinity API Reference
Trinity API Reference
interfaces
interfaces
interfaces
tdetexteditor
cursorinterface.h
1
/* This file is part of the KDE libraries
2
Copyright (C) 2001 Christoph Cullmann <cullmann@kde.org>
3
4
This library is free software; you can redistribute it and/or
5
modify it under the terms of the GNU Library General Public
6
License version 2 as published by the Free Software Foundation.
7
8
This library is distributed in the hope that it will be useful,
9
but WITHOUT ANY WARRANTY; without even the implied warranty of
10
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
Library General Public License for more details.
12
13
You should have received a copy of the GNU Library General Public License
14
along with this library; see the file COPYING.LIB. If not, write to
15
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16
Boston, MA 02110-1301, USA.
17
*/
18
19
#ifndef __tdetexteditor_cursorinterface_h__
20
#define __tdetexteditor_cursorinterface_h__
21
22
#include <tqptrlist.h>
23
#include <tqstring.h>
24
25
#include <tdelibs_export.h>
26
27
namespace
KTextEditor
28
{
29
33
class
KTEXTEDITOR_EXPORT
Cursor
34
{
35
public
:
36
virtual
void
position (
unsigned
int
*line,
unsigned
int
*col )
const
= 0;
37
38
virtual
bool
setPosition (
unsigned
int
line,
unsigned
int
col ) = 0;
39
40
virtual
bool
insertText (
const
TQString& text ) = 0;
41
42
virtual
bool
removeText (
unsigned
int
numberOfCharacters ) = 0;
43
44
virtual
TQChar currentChar ()
const
= 0;
45
};
46
50
class
KTEXTEDITOR_EXPORT
CursorInterface
51
{
52
friend
class
PrivateCursorInterface;
53
54
public
:
55
CursorInterface
();
56
virtual
~
CursorInterface
();
57
58
unsigned
int
cursorInterfaceNumber ()
const
;
59
60
protected
:
61
void
setCursorInterfaceDCOPSuffix (
const
TQCString &suffix);
62
63
public
:
67
virtual
Cursor
*createCursor ( ) = 0;
68
69
/*
70
* Accessor to the list of cursors.
71
*/
72
virtual
TQPtrList<Cursor> cursors ()
const
= 0;
73
74
private
:
75
class
PrivateCursorInterface *d;
76
static
unsigned
int
globalCursorInterfaceNumber;
77
unsigned
int
myCursorInterfaceNumber;
78
};
79
80
KTEXTEDITOR_EXPORT
CursorInterface
*cursorInterface (
class
Document
*doc);
81
82
}
83
84
#endif
KTextEditor::Cursor
This class represents a text cursor.
Definition:
cursorinterface.h:33
KTextEditor::Document
The main class representing a text document.
Definition:
document.h:31
KTextEditor
KTextEditor is KDE's standard text editing KPart interface.
Definition:
blockselectiondcopinterface.h:9
KTextEditor::CursorInterface
This is an interface for accessing the cursor of the Document class.
Definition:
cursorinterface.h:50
interfaces
Skip menu "interfaces"
Main Page
Namespace List
Class Hierarchy
Alphabetical List
Class List
File List
Namespace Members
Class Members
Related Pages
interfaces
Skip menu "interfaces"
arts
dcop
dnssd
interfaces
kspeech
interface
library
tdetexteditor
kate
kded
kdoctools
kimgio
kjs
libtdemid
libtdescreensaver
tdecore
tdeabc
tdecmshell
tdecore
tdefx
tdehtml
tdeinit
tdeio
bookmarks
httpfilter
kpasswdserver
kssl
tdeioslave
http
tdefile
tdeio
tdeioexec
tdemdi
tdemdi
tdenewstuff
tdeparts
tdeprint
tderandr
tderesources
tdespell2
tdesu
tdeui
tdeunittest
tdeutils
tdewallet