3 Copyright (c) 2012 Jakob Leben & Tim Blechmann
4 http://www.audiosynth.com
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 #ifndef SCIDE_WIDGET_CODE_EDITOR_EDITOR_BOX_HPP
23 #define SCIDE_WIDGET_CODE_EDITOR_EDITOR_BOX_HPP
26 #include <QStackedLayout>
33 class CodeEditorBox
: public QWidget
38 typedef QList
< CodeEditor
* > History
;
40 CodeEditorBox(QWidget
*parent
= 0);
42 void setDocument(Document
*, int pos
= -1);
44 CodeEditor
*currentEditor();
45 Document
*currentDocument();
47 const History
& history() { return mHistory
; }
50 void currentChanged(CodeEditor
*);
51 void editorFocusChanged( CodeEditor
*, bool focused
);
54 void onDocumentClosed(Document
*);
57 int historyIndexOf(Document
*);
58 CodeEditor
*editorForDocument(Document
*);
59 bool eventFilter( QObject
*, QEvent
* );
61 QStackedLayout
*mLayout
;
67 #endif // SCIDE_WIDGET_CODE_EDITOR_EDITOR_BOX_HPP