~ubuntu-branches/ubuntu/wily/juffed/wily-proposed

« back to all changes in this revision

Viewing changes to include/DocHandlerInt.h

  • Committer: Bazaar Package Importer
  • Author(s): Maia Kozheva
  • Date: 2011-04-30 13:43:26 UTC
  • mfrom: (2.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20110430134326-0bnvvo5z2medbdxi
Tags: 0.9.1137-1
* New upstream release.
* Remove debian/juffed.1, added upstream (in debian.in).
* Remove debian/patches/static.patch: we can now bundle the .so after
  upstream has resolved soname issues.
* debian/control:
  - Bump Standards-Version to 0.9.2.
  - Update homepage.
  - Do not build-depend on chrpath, not needed anymore.
* debian/rules:
  - Remove chrpath rule, not needed anymore.
* Add juffed-dev and juffed-plugins packages.
* Do not install the libkeybindings.so plugin: causes a segfault on my
  amd64 machine.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
JuffEd - An advanced text editor
 
3
Copyright 2007-2010 Mikhail Murzin
 
4
 
 
5
This program is free software; you can redistribute it and/or
 
6
modify it under the terms of the GNU General Public License 
 
7
version 2 as published by the Free Software Foundation.
 
8
 
 
9
This program is distributed in the hope that it will be useful,
 
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
GNU General Public License for more details.
 
13
 
 
14
You should have received a copy of the GNU General Public License
 
15
along with this program; if not, write to the Free Software
 
16
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
17
*/
 
18
 
 
19
#ifndef __JUFFED_DOC_HANDLER_INT_H__
 
20
#define __JUFFED_DOC_HANDLER_INT_H__
 
21
 
 
22
#include "LibConfig.h"
 
23
 
 
24
#include "Enums.h"
 
25
 
 
26
namespace Juff {
 
27
 
 
28
class Document;
 
29
class Project;
 
30
 
 
31
class LIBJUFF_EXPORT DocHandlerInt {
 
32
public:
 
33
        /**
 
34
        * Returns app's main window.
 
35
        */
 
36
        virtual QWidget* mainWindow() const = 0;
 
37
        
 
38
        /**
 
39
        * Returns current document. If there is no documents then returns a NullDoc.
 
40
        */
 
41
        virtual Juff::Document* curDoc() const = 0;
 
42
 
 
43
        /**
 
44
        * Returns document by file name. If there is no such document opened then returns a NullDoc.
 
45
        */
 
46
        virtual Juff::Document* getDoc(const QString&) const = 0;
 
47
 
 
48
        /**
 
49
        * Returns current project.
 
50
        */
 
51
        virtual Juff::Project* curPrj() const = 0;
 
52
 
 
53
        /**
 
54
        * Opens a document with a given file name or activates it if it is already opened.
 
55
        */
 
56
        virtual void openDoc(const QString&, Juff::PanelIndex panel = Juff::PanelCurrent) = 0;
 
57
 
 
58
        /**
 
59
        * Closes the document with a given file name.
 
60
        */
 
61
        virtual void closeDoc(const QString&) = 0;
 
62
 
 
63
        /**
 
64
        * Closes all document at the given panel.
 
65
        */
 
66
        virtual void closeAllDocs(Juff::PanelIndex panel) = 0;
 
67
        
 
68
        /**
 
69
        * Closes all document except for the given index at the given panel.
 
70
        */
 
71
        virtual void closeAllOtherDocs(int index, Juff::PanelIndex panel) = 0;
 
72
        
 
73
        /**
 
74
        * Saves the document with a given file name.
 
75
        */
 
76
        virtual void saveDoc(const QString&) = 0;
 
77
 
 
78
        /**
 
79
        * Returns the number of currently opened documents for the given panel.
 
80
        */
 
81
        virtual int docCount(Juff::PanelIndex) const = 0;
 
82
 
 
83
        /**
 
84
        * Returns the list of currently opened documents.
 
85
        */
 
86
        virtual QStringList docList() const = 0;
 
87
};
 
88
 
 
89
}
 
90
 
 
91
#endif // __JUFFED_DOC_HANDLER_INT_H__