author | jowenn <jowenn> | 2002-11-10 21:08:01 (UTC) |
---|---|---|
committer | jowenn <jowenn> | 2002-11-10 21:08:01 (UTC) |
commit | e97a6da57804aa14907dec327fbae71bff9b383e (patch) (unidiff) | |
tree | 15f6ee292dba24bdda72f5c72f6d2224c3516763 /noncore/apps/tinykate/libkate/interfaces/view.h | |
parent | 7c012ee8cd16d8befacc6f6750711443fac0fd5e (diff) | |
download | opie-e97a6da57804aa14907dec327fbae71bff9b383e.zip opie-e97a6da57804aa14907dec327fbae71bff9b383e.tar.gz opie-e97a6da57804aa14907dec327fbae71bff9b383e.tar.bz2 |
import of tiny kate. (saving not possible yet)
Diffstat (limited to 'noncore/apps/tinykate/libkate/interfaces/view.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/tinykate/libkate/interfaces/view.h | 160 |
1 files changed, 160 insertions, 0 deletions
diff --git a/noncore/apps/tinykate/libkate/interfaces/view.h b/noncore/apps/tinykate/libkate/interfaces/view.h new file mode 100644 index 0000000..5b24bb5 --- a/dev/null +++ b/noncore/apps/tinykate/libkate/interfaces/view.h | |||
@@ -0,0 +1,160 @@ | |||
1 | /*************************************************************************** | ||
2 | view.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_VIEW_INCLUDE_ | ||
29 | #define _KATE_VIEW_INCLUDE_ | ||
30 | |||
31 | #include <ktexteditor.h> | ||
32 | |||
33 | class KConfig; | ||
34 | |||
35 | namespace Kate | ||
36 | { | ||
37 | |||
38 | class Document; | ||
39 | class Mark; | ||
40 | |||
41 | /** This interface provides access to the view. | ||
42 | */ | ||
43 | class View : public KTextEditor::View | ||
44 | { | ||
45 | Q_OBJECT | ||
46 | |||
47 | public: | ||
48 | View ( KTextEditor::Document *doc, QWidget *parent, const char *name = 0 ); | ||
49 | virtual ~View (); | ||
50 | |||
51 | /** Returns a pointer to the document of the view. | ||
52 | */ | ||
53 | virtual Document *getDoc () { return 0L; }; | ||
54 | |||
55 | /** Returns the marked text in the view. | ||
56 | */ | ||
57 | virtual QString markedText () { return 0L; }; | ||
58 | |||
59 | public slots: | ||
60 | /** popup a config dialog for the editor part. | ||
61 | */ | ||
62 | virtual void configDialog () { ; }; | ||
63 | |||
64 | // Highlighting slots | ||
65 | virtual void setHl (int) { ; }; | ||
66 | virtual int getHl () { return 0; }; | ||
67 | virtual int getHlCount () { return 0; }; | ||
68 | virtual QString getHlName (int) { return 0L; }; | ||
69 | virtual QString getHlSection (int) { return 0L; }; | ||
70 | |||
71 | // undo/redo stuff | ||
72 | virtual void undo () { ; }; | ||
73 | virtual void redo () { ; }; | ||
74 | virtual void undoHistory() { ; }; | ||
75 | |||
76 | public: | ||
77 | // read/save config of the view | ||
78 | virtual void readConfig () { ; }; | ||
79 | virtual void writeConfig () { ; }; | ||
80 | |||
81 | // read/save sessionconfig of the view | ||
82 | virtual void readSessionConfig (KConfig *) { ; }; | ||
83 | virtual void writeSessionConfig (KConfig *) { ; }; | ||
84 | |||
85 | public slots: | ||
86 | // some simply key commands | ||
87 | virtual void keyReturn () { ; }; | ||
88 | virtual void keyDelete () { ; }; | ||
89 | virtual void backspace () { ; }; | ||
90 | virtual void killLine () { ; }; | ||
91 | |||
92 | // move cursor in the view | ||
93 | virtual void cursorLeft () { ; }; | ||
94 | virtual void shiftCursorLeft () { ; }; | ||
95 | virtual void cursorRight () { ; }; | ||
96 | virtual void shiftCursorRight () { ; }; | ||
97 | virtual void wordLeft () { ; }; | ||
98 | virtual void shiftWordLeft () { ; }; | ||
99 | virtual void wordRight () { ; }; | ||
100 | virtual void shiftWordRight () { ; }; | ||
101 | virtual void home () { ; }; | ||
102 | virtual void shiftHome () { ; }; | ||
103 | virtual void end () { ; }; | ||
104 | virtual void shiftEnd () { ; }; | ||
105 | virtual void up () { ; }; | ||
106 | virtual void shiftUp () { ; }; | ||
107 | virtual void down () { ; }; | ||
108 | virtual void shiftDown () { ; }; | ||
109 | virtual void scrollUp () { ; }; | ||
110 | virtual void scrollDown () { ; }; | ||
111 | virtual void topOfView () { ; }; | ||
112 | virtual void bottomOfView () { ; }; | ||
113 | virtual void pageUp () { ; }; | ||
114 | virtual void shiftPageUp () { ; }; | ||
115 | virtual void pageDown () { ; }; | ||
116 | virtual void shiftPageDown () { ; }; | ||
117 | virtual void top () { ; }; | ||
118 | virtual void shiftTop () { ; }; | ||
119 | virtual void bottom () { ; }; | ||
120 | virtual void shiftBottom () { ; }; | ||
121 | |||
122 | public slots: | ||
123 | // edit command popup window | ||
124 | virtual void slotEditCommand () { ; }; | ||
125 | |||
126 | // icon border enable/disable | ||
127 | virtual void setIconBorder (bool) { ; }; | ||
128 | virtual void toggleIconBorder () { ; }; | ||
129 | |||
130 | // goto mark | ||
131 | virtual void gotoMark (Mark *) { ; }; | ||
132 | |||
133 | // toggle current line bookmark or clear all bookmarks | ||
134 | virtual void toggleBookmark () { ; }; | ||
135 | virtual void clearBookmarks () { ; }; | ||
136 | |||
137 | public: | ||
138 | // is iconborder visible ? | ||
139 | virtual bool iconBorder() { return false; }; | ||
140 | |||
141 | public slots: | ||
142 | /** | ||
143 | Flushes the document of the text widget. The user is given | ||
144 | a chance to save the current document if the current document has | ||
145 | been modified. | ||
146 | */ | ||
147 | virtual void flush () { ; }; | ||
148 | |||
149 | public: | ||
150 | /** | ||
151 | Returns true if the current document can be | ||
152 | discarded. If the document is modified, the user is asked if he wants | ||
153 | to save it. On "cancel" the function returns false. | ||
154 | */ | ||
155 | virtual bool canDiscard() { return false; }; | ||
156 | }; | ||
157 | |||
158 | }; | ||
159 | |||
160 | #endif | ||