2
JuffEd - An advanced text editor
3
Copyright 2007-2010 Mikhail Murzin
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.
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.
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.
19
#ifndef _JUFF_SCINTILLA_H_
20
#define _JUFF_SCINTILLA_H_
24
#include <Qsci/qsciscintilla.h>
26
#include <QtGui/QDragEnterEvent>
27
#include <QtGui/QDropEvent>
28
#include <QtGui/QMenu>
30
class JuffScintilla : public QsciScintilla {
38
virtual ~JuffScintilla();
43
void showLineNumbers(bool);
44
bool lineNumbersVisible() const;
46
QString wordUnderCursor();
48
// TODO : refactor this method
49
void highlightText(HLMode, const Juff::SearchParams&);
50
void highlight(HLMode, int, int, int, int);
53
void contextMenuCalled(int, int);
55
void markersMenuRequested(const QPoint&);
59
void updateLineNumbers();
62
virtual void dragEnterEvent(QDragEnterEvent* e);
63
virtual void dropEvent(QDropEvent* e);
64
virtual void contextMenuEvent(QContextMenuEvent* e);
65
virtual void focusInEvent(QFocusEvent* e);
66
virtual void focusOutEvent(QFocusEvent* e);
67
virtual void keyPressEvent(QKeyEvent*);
68
virtual void wheelEvent(QWheelEvent*);
71
void cancelRectInput();
72
void getOrderedSelection(int&, int&, int&, int&);
73
void deleteRectSelection();
74
void deleteRectSelection(int, int, int, int);
76
void highlight(int start, int end, int ind);
77
void clearHighlighting();
78
void initHighlightingStyle(int id, const QColor &color);
79
// bool findML(const QString& s, const DocFindFlags& flags);
82
bool showLineNumbers_;