• 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
31namespace Kate
32{
33
34class PrivateDocumentManager
35 {
36 public:
37 PrivateDocumentManager ()
38 {
39 }
40
41 ~PrivateDocumentManager ()
42 {
43 }
44
45 KateDocManager *docMan;
46 };
47
48DocumentManager::DocumentManager (void *documentManager) : TQObject ((KateDocManager*) documentManager)
49{
50 d = new PrivateDocumentManager ();
51 d->docMan = (KateDocManager*) documentManager;
52}
53
54DocumentManager::~DocumentManager ()
55{
56 delete d;
57}
58
59Document *DocumentManager::document (uint n)
60{
61 return d->docMan->document (n);
62}
63
64Document *DocumentManager::activeDocument ()
65{
66 return d->docMan->activeDocument ();
67}
68
69Document *DocumentManager::documentWithID (uint id)
70{
71 return d->docMan->documentWithID (id);
72}
73
74int DocumentManager::findDocument (const KURL &url)
75{
76 return d->docMan->findDocument (url);
77}
78
79bool DocumentManager::isOpen (const KURL &url)
80{
81 return d->docMan->isOpen (url);
82}
83
84uint DocumentManager::documents ()
85{
86 return d->docMan->documents ();
87}
88
89Document *DocumentManager::openURL(const KURL&url,const TQString &encoding,uint *id)
90{
91 return d->docMan->openURL (url, encoding, id);
92}
93
94bool DocumentManager::closeDocument(Document *document)
95{
96 return d->docMan->closeDocument (document);
97}
98
99bool DocumentManager::closeDocument(uint n)
100{
101 return d->docMan->closeDocument (n);
102}
103
104bool DocumentManager::closeDocumentWithID(uint id)
105{
106 return d->docMan->closeDocument (id);
107}
108
109bool DocumentManager::closeAllDocuments()
110{
111 return d->docMan->closeAllDocuments ();
112}
113
114DocumentManager *documentManager ()
115{
116 return application()->documentManager ();
117}
118
119}
120
Kate::Application::documentManager
Kate::DocumentManager * documentManager()
Returns a pointer to the document manager.
Definition: application.cpp:60
Kate::DocumentManager
This interface provides access to the Kate Document Manager.
Definition: documentmanager.h:30
Kate
Namespace collecting as much of the internal Kate classes as we can manage.
Definition: kateapp.h:32
Kate::application
Application * application()
Returns the application object.
Definition: application.cpp:91
Kate::documentManager
DocumentManager * documentManager()
Returns the document manager object.
Definition: documentmanager.cpp:114

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.9.4
This website is maintained by Timothy Pearson.