summaryrefslogtreecommitdiff
path: root/noncore/apps/tinykate/libkate/interfaces/view.h
blob: 5b24bb5f1ec5bb4d6a78aeb656e081a5e56157cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
/***************************************************************************
                          view.h -  description
                             -------------------
    begin                : Mon Jan 15 2001
    copyright            : (C) 2001 by Christoph "Crossfire" Cullmann
                           (C) 2002 by Joseph Wenninger
    email                : crossfire@babylon2k.de
                           jowenn@kde.org 
***************************************************************************/

/***************************************************************************
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Library General Public License for more details.

    You should have received a copy of the GNU Library General Public License
    along with this library; see the file COPYING.LIB.  If not, write to
    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.
 ***************************************************************************/

#ifndef _KATE_VIEW_INCLUDE_
#define _KATE_VIEW_INCLUDE_

#include <ktexteditor.h>

class KConfig;

namespace Kate
{

class Document;
class Mark;

/** This interface provides access to the view.
*/
class View : public KTextEditor::View
{
  Q_OBJECT

  public:
    View ( KTextEditor::Document *doc, QWidget *parent, const char *name = 0 );
    virtual ~View ();

    /** Returns a pointer to the document of the view.
    */
    virtual Document *getDoc () { return 0L; };

    /** Returns the marked text in the view.
    */
    virtual QString markedText () { return 0L; };

  public slots:
    /** popup a config dialog for the editor part.
    */
    virtual void configDialog () { ; };

    // Highlighting slots
    virtual void setHl (int) { ; };
    virtual int getHl () { return 0; };
    virtual int getHlCount () { return 0; };
    virtual QString getHlName (int) { return 0L; };
    virtual QString getHlSection (int) { return 0L; };

    // undo/redo stuff
    virtual void undo () { ; };
    virtual void redo () { ; };
    virtual void undoHistory() { ; };

  public:
    // read/save config of the view
    virtual void readConfig () { ; };
    virtual void writeConfig () { ; };

    // read/save sessionconfig of the view
    virtual void readSessionConfig (KConfig *) { ; };
    virtual void writeSessionConfig (KConfig *) { ; };

  public slots:
    // some simply key commands
    virtual void keyReturn () { ; };
    virtual void keyDelete () { ; };
    virtual void backspace () { ; };
    virtual void killLine () { ; };

    // move cursor in the view
    virtual void cursorLeft () { ; };
    virtual void shiftCursorLeft () { ; };
    virtual void cursorRight () { ; };
    virtual void shiftCursorRight () { ; };
    virtual void wordLeft () { ; };
    virtual void shiftWordLeft () { ; };
    virtual void wordRight () { ; };
    virtual void shiftWordRight () { ; };
    virtual void home () { ; };
    virtual void shiftHome () { ; };
    virtual void end () { ; };
    virtual void shiftEnd () { ; };
    virtual void up () { ; };
    virtual void shiftUp () { ; };
    virtual void down () { ; };
    virtual void shiftDown () { ; };
    virtual void scrollUp () { ; };
    virtual void scrollDown () { ; };
    virtual void topOfView () { ; };
    virtual void bottomOfView () { ; };
    virtual void pageUp () { ; };
    virtual void shiftPageUp () { ; };
    virtual void pageDown () { ; };
    virtual void shiftPageDown () { ; };
    virtual void top () { ; };
    virtual void shiftTop () { ; };
    virtual void bottom () { ; };
    virtual void shiftBottom () { ; };

  public slots:
    // edit command popup window
    virtual void slotEditCommand () { ; };

    // icon border enable/disable
    virtual void setIconBorder (bool) { ; };
    virtual void toggleIconBorder () { ; };

    // goto mark
    virtual void gotoMark (Mark *) { ; };

    // toggle current line bookmark or clear all bookmarks
    virtual void toggleBookmark () { ; };
    virtual void clearBookmarks () { ; };

  public:
    // is iconborder visible ?
    virtual bool iconBorder() { return false; };

  public slots:
     /**
      Flushes the document of the text widget. The user is given
      a chance to save the current document if the current document has
      been modified.
    */
    virtual void flush () { ; };

  public:
    /**
      Returns true if the current document can be
      discarded. If the document is modified, the user is asked if he wants
      to save it. On "cancel" the function returns false.
    */
    virtual bool canDiscard() { return false; };
};

};

#endif