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

kate

  • kate
  • interfaces
documentmanager.cpp
1 /* This file is part of the KDE project
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 #include "documentmanager.h"
20 #include "documentmanager.moc"
21 
22 #include "plugin.h"
23 #include "viewmanager.h"
24 #include "toolviewmanager.h"
25 #include "pluginmanager.h"
26 
27 #include "application.h"
28 
29 #include "../app/katedocmanager.h"
30 
31 namespace Kate
32 {
33 
34 class PrivateDocumentManager
35  {
36  public:
37  PrivateDocumentManager ()
38  {
39  }
40 
41  ~PrivateDocumentManager ()
42  {
43  }
44 
45  KateDocManager *docMan;
46  };
47 
48 DocumentManager::DocumentManager (void *documentManager) : TQObject ((KateDocManager*) documentManager)
49 {
50  d = new PrivateDocumentManager ();
51  d->docMan = (KateDocManager*) documentManager;
52 }
53 
54 DocumentManager::~DocumentManager ()
55 {
56  delete d;
57 }
58 
59 Document *DocumentManager::document (uint n)
60 {
61  return d->docMan->document (n);
62 }
63 
64 Document *DocumentManager::activeDocument ()
65 {
66  return d->docMan->activeDocument ();
67 }
68 
69 Document *DocumentManager::documentWithID (uint id)
70 {
71  return d->docMan->documentWithID (id);
72 }
73 
74 int DocumentManager::findDocument (const KURL &url)
75 {
76  return d->docMan->findDocument (url);
77 }
78 
79 bool DocumentManager::isOpen (const KURL &url)
80 {
81  return d->docMan->isOpen (url);
82 }
83 
84 uint DocumentManager::documents ()
85 {
86  return d->docMan->documents ();
87 }
88 
89 Document *DocumentManager::openURL(const KURL&url,const TQString &encoding,uint *id)
90 {
91  return d->docMan->openURL (url, encoding, id);
92 }
93 
94 bool DocumentManager::closeDocument(Document *document)
95 {
96  return d->docMan->closeDocument (document);
97 }
98 
99 bool DocumentManager::closeDocument(uint n)
100 {
101  return d->docMan->closeDocument (n);
102 }
103 
104 bool DocumentManager::closeDocumentWithID(uint id)
105 {
106  return d->docMan->closeDocument (id);
107 }
108 
109 bool DocumentManager::closeAllDocuments()
110 {
111  return d->docMan->closeAllDocuments ();
112 }
113 
114 DocumentManager *documentManager ()
115 {
116  return application()->documentManager ();
117 }
118 
119 }
120 
Kate::DocumentManager::documents
uint documents()
returns the number of documents managed by this manager.
Definition: documentmanager.cpp:84
Kate::DocumentManager::findDocument
int findDocument(const KURL &url)
Returns the ID of the document located at url if such a document is known by the manager.
Definition: documentmanager.cpp:74
Kate::DocumentManager::closeAllDocuments
bool closeAllDocuments()
close all documents
Definition: documentmanager.cpp:109
Kate::DocumentManager::document
class Document * document(uint n=0)
Returns a pointer to the document indexed by n in the managers internal list.
Definition: documentmanager.cpp:59
Kate::DocumentManager::activeDocument
class Document * activeDocument()
Returns a pointer to the currently active document or NULL if no document is open.
Definition: documentmanager.cpp:64
Kate::DocumentManager::closeDocumentWithID
bool closeDocumentWithID(uint id)
close a document identified by the ID
Definition: documentmanager.cpp:104
Kate::Application::documentManager
Kate::DocumentManager * documentManager()
Returns a pointer to the document manager.
Definition: application.cpp:60
Kate::DocumentManager::openURL
class Document * openURL(const KURL &url, const TQString &encoding=TQString::null, uint *id=0)
open a document and return a pointer to the document, if you specify a pointer != 0 to the id paramet...
Definition: documentmanager.cpp:89
Kate::documentManager
DocumentManager * documentManager()
Returns the document manager object.
Definition: documentmanager.cpp:114
Kate::DocumentManager
This interface provides access to the Kate Document Manager.
Definition: documentmanager.h:29
Kate::DocumentManager::isOpen
bool isOpen(const KURL &url)
Returns true if the document located at url is open, otherwise false.
Definition: documentmanager.cpp:79
Kate::application
Application * application()
Returns the application object.
Definition: application.cpp:91
Kate
Namespace collecting as much of the internal Kate classes as we can manage.
Definition: kateapp.h:32
Kate::DocumentManager::documentWithID
class Document * documentWithID(uint id)
Returns a pointer to the document with the given ID or NULL if no such document exists.
Definition: documentmanager.cpp:69
Kate::DocumentManager::closeDocument
bool closeDocument(class Document *document)
close a document by pointer
Definition: documentmanager.cpp:94

kate

Skip menu "kate"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kate

Skip menu "kate"
  • kate
  • libkonq
  • twin
  •   lib
Generated for kate by doxygen 1.8.13
This website is maintained by Timothy Pearson.