Diffstat (limited to 'noncore/apps/tinykate/libkate/interfaces/document.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/tinykate/libkate/interfaces/document.h | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/noncore/apps/tinykate/libkate/interfaces/document.h b/noncore/apps/tinykate/libkate/interfaces/document.h new file mode 100644 index 0000000..cbfd1b3 --- a/dev/null +++ b/noncore/apps/tinykate/libkate/interfaces/document.h | |||
@@ -0,0 +1,103 @@ | |||
1 | /*************************************************************************** | ||
2 | document.h - description | ||
3 | ------------------- | ||
4 | begin : Mon Jan 15 2001 | ||
5 | copyright : (C) 2001 by Christoph "Crossfire" Cullmann | ||
6 | (C) 2002 by Joseph Wenninger | ||
7 | email : crossfire@babylon2k.de | ||
8 | jowenn@kde.org | ||
9 | ***************************************************************************/ | ||
10 | |||
11 | /*************************************************************************** | ||
12 | This library is free software; you can redistribute it and/or | ||
13 | modify it under the terms of the GNU Library General Public | ||
14 | License as published by the Free Software Foundation; either | ||
15 | version 2 of the License, or (at your option) any later version. | ||
16 | |||
17 | This library is distributed in the hope that it will be useful, | ||
18 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
20 | Library General Public License for more details. | ||
21 | |||
22 | You should have received a copy of the GNU Library General Public License | ||
23 | along with this library; see the file COPYING.LIB. If not, write to | ||
24 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | ||
26 | ***************************************************************************/ | ||
27 | |||
28 | #ifndef _KATE_DOCUMENT_INCLUDE_ | ||
29 | #define _KATE_DOCUMENT_INCLUDE_ | ||
30 | |||
31 | #include <ktexteditor.h> | ||
32 | |||
33 | class KConfig; | ||
34 | |||
35 | namespace Kate | ||
36 | { | ||
37 | |||
38 | /** internal class for document bookmarks. */ | ||
39 | class Mark | ||
40 | { | ||
41 | public: | ||
42 | uint line; | ||
43 | uint type; | ||
44 | }; | ||
45 | |||
46 | /** This interface provedes access to the Kate Document class. | ||
47 | */ | ||
48 | class Document : public KTextEditor::Document | ||
49 | { | ||
50 | Q_OBJECT | ||
51 | |||
52 | public: | ||
53 | Document (); | ||
54 | virtual ~Document (); | ||
55 | |||
56 | public: | ||
57 | /** Read document config. | ||
58 | */ | ||
59 | virtual void readConfig () { ; }; | ||
60 | /** Save document config. | ||
61 | */ | ||
62 | virtual void writeConfig () { ; }; | ||
63 | |||
64 | /** Read document session config. | ||
65 | */ | ||
66 | virtual void readSessionConfig (KConfig *) { ; }; | ||
67 | /** Save document session config. | ||
68 | */ | ||
69 | virtual void writeSessionConfig (KConfig *) { ; }; | ||
70 | |||
71 | /** Returns the document ID. | ||
72 | */ | ||
73 | virtual uint docID () { return 0L; }; | ||
74 | |||
75 | /** Defines possible mark types. A line can have marks of different types. | ||
76 | */ | ||
77 | enum marks | ||
78 | { | ||
79 | Bookmark = 1, | ||
80 | Breakpoint = 2, | ||
81 | markType0 = 4, | ||
82 | markType1 = 8, | ||
83 | markType2 = 16, | ||
84 | markType3 = 32, | ||
85 | markType4 = 64, | ||
86 | markType5 = 128, | ||
87 | markType6 = 256, | ||
88 | markType7 = 512, | ||
89 | markType8 = 1024 | ||
90 | }; | ||
91 | |||
92 | /** A list of all marks in a document. Use binary comparing to find marks of a specific type. | ||
93 | */ | ||
94 | virtual QList<Mark> marks () { QList<Mark> l; return l; }; | ||
95 | |||
96 | public slots: | ||
97 | // clear buffer/filename - update the views | ||
98 | virtual void flush () { ; }; | ||
99 | }; | ||
100 | |||
101 | }; | ||
102 | |||
103 | #endif | ||