Skip to content
Skip to link menu
Trinity API Reference
Trinity API Reference
interfaces/ktexteditor
interfaces/ktexteditor
interfaces
ktexteditor
selectioninterface.cpp
1
#include "selectioninterface.h"
2
#include "selectiondcopinterface.h"
3
#include "document.h"
4
#include "view.h"
5
6
using namespace
KTextEditor;
7
8
namespace
KTextEditor
9
{
10
class
PrivateSelectionInterface
11
{
12
public
:
13
PrivateSelectionInterface()
14
{
15
interface
= 0;
16
}
17
~PrivateSelectionInterface(){}
18
// Data Members
19
SelectionDCOPInterface
*interface;
20
};
21
22
}
23
24
unsigned
int
SelectionInterface::globalSelectionInterfaceNumber = 0;
25
26
SelectionInterface::SelectionInterface()
27
{
28
d =
new
PrivateSelectionInterface();
29
globalSelectionInterfaceNumber++;
30
mySelectionInterfaceNumber = globalSelectionInterfaceNumber;
31
TQString name =
"SelectionInterface#"
+ TQString::number(mySelectionInterfaceNumber);
32
d->interface =
new
SelectionDCOPInterface
(
this
, name.latin1());
33
}
34
SelectionInterface::~SelectionInterface()
35
{
36
delete
d->interface;
37
delete
d;
38
}
39
40
unsigned
int
SelectionInterface::selectionInterfaceNumber ()
const
41
{
42
return
mySelectionInterfaceNumber;
43
}
44
45
void
SelectionInterface::setSelectionInterfaceDCOPSuffix (
const
TQCString &suffix)
46
{
47
d->interface->setObjId (
"SelectionInterface#"
+suffix);
48
}
49
50
SelectionInterface
*KTextEditor::selectionInterface (
Document
*doc)
51
{
52
if
(!doc)
53
return
0;
54
55
return
dynamic_cast<
KTextEditor::SelectionInterface
*
>
(doc);
56
}
57
58
SelectionInterface
*KTextEditor::selectionInterface (
View
*view)
59
{
60
if
(!view)
61
return
0;
62
63
return
dynamic_cast<
KTextEditor::SelectionInterface
*
>
(view);
64
}
65
KTextEditor::SelectionInterface
This is an interface to text selection for the Document class.
Definition:
selectioninterface.h:33
KTextEditor::Document
The main class representing a text document.
Definition:
document.h:31
KTextEditor::SelectionDCOPInterface
This is the main interface to the SelectionInterface of KTextEdit.
Definition:
selectiondcopinterface.h:18
KTextEditor::View
The View class represents a single view of a Document .
Definition:
view.h:32
interfaces/ktexteditor
Skip menu "interfaces/ktexteditor"
Main Page
Namespace List
Class Hierarchy
Alphabetical List
Class List
File List
Namespace Members
Class Members
interfaces/ktexteditor
Skip menu "interfaces/ktexteditor"
arts
dcop
dnssd
interfaces
interface
library
kspeech
ktexteditor
kabc
kate
kcmshell
kdecore
kded
kdefx
kdeprint
kdesu
kdeui
kdoctools
khtml
kimgio
kinit
kio
bookmarks
httpfilter
kfile
kio
kioexec
kpasswdserver
kssl
kioslave
http
kjs
kmdi
kmdi
knewstuff
kparts
krandr
kresources
kspell2
kunittest
kutils
kwallet
libkmid
libkscreensaver