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

interfaces

  • interfaces
  • tdetexteditor
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
KTextEditor is KDE's standard text editing KPart interface.
Definition: blockselectiondcopinterface.h:9
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: tdetexteditor/view.h:32
TDEStdAccel::name
TQString name(StdAccel id)

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
Generated for interfaces by doxygen 1.8.8
This website is maintained by Timothy Pearson.