summaryrefslogtreecommitdiffstats
path: root/interfaces/ktexteditor/selectiondcopinterface.cpp
blob: f341297e0dbf788aeff889185aaf5c7c30b46728 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#include "selectiondcopinterface.h"
#include "selectioninterface.h"

#include <dcopclient.h>
using namespace KTextEditor;

SelectionDCOPInterface::SelectionDCOPInterface( SelectionInterface *Parent, const char *name)
	: DCOPObject(name)
{
	m_parent = Parent;
}

SelectionDCOPInterface::~SelectionDCOPInterface()
{

}

    /**
    *  @return set the selection from line_start,col_start to line_end,col_end
    */
     bool SelectionDCOPInterface::setSelection ( uint startLine, uint startCol, uint endLine, uint endCol )
     {
	return m_parent->setSelection ( startLine, startCol, endLine, endCol );
     }

    /**
    *  removes the current Selection (not Text)
    */
     bool SelectionDCOPInterface::clearSelection ()
     {
	return m_parent->clearSelection();
     }

    /**
    *  @return true if there is a selection
    */
     bool SelectionDCOPInterface::hasSelection ()
     {
	return m_parent->hasSelection();
	}

    /**
    *  @return a TQString for the selected text
    */
     TQString SelectionDCOPInterface::selection ()
     {
	return m_parent->selection();
     }

    /**
    *  removes the selected Text
    */
     bool SelectionDCOPInterface::removeSelectedText ()
     {
	return m_parent->removeSelectedText();
     }

    /**
    *  select the whole text
    */
     bool SelectionDCOPInterface::selectAll ()
     {
	return m_parent->selectAll();
     }