~ubuntu-branches/ubuntu/raring/juffed/raring

« back to all changes in this revision

Viewing changes to src/app/qsci/LexerStorage.h

  • Committer: Bazaar Package Importer
  • Author(s): Maia Kozheva
  • Date: 2011-04-30 13:43:26 UTC
  • mfrom: (2.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20110430134326-0bnvvo5z2medbdxi
Tags: 0.9.1137-1
* New upstream release.
* Remove debian/juffed.1, added upstream (in debian.in).
* Remove debian/patches/static.patch: we can now bundle the .so after
  upstream has resolved soname issues.
* debian/control:
  - Bump Standards-Version to 0.9.2.
  - Update homepage.
  - Do not build-depend on chrpath, not needed anymore.
* debian/rules:
  - Remove chrpath rule, not needed anymore.
* Add juffed-dev and juffed-plugins packages.
* Do not install the libkeybindings.so plugin: causes a segfault on my
  amd64 machine.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
JuffEd - An advanced text editor
 
3
Copyright 2007-2010 Mikhail Murzin
 
4
 
 
5
 
 
6
This program is free software; you can redistribute it and/or
 
7
modify it under the terms of the GNU General Public License 
 
8
version 2 as published by the Free Software Foundation.
 
9
 
 
10
This program is distributed in the hope that it will be useful,
 
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
GNU General Public License for more details.
 
14
 
 
15
You should have received a copy of the GNU General Public License
 
16
along with this program; if not, write to the Free Software
 
17
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
18
*/
 
19
 
 
20
#ifndef __JUFF_LEXER_STORAGE_H__
 
21
#define __JUFF_LEXER_STORAGE_H__
 
22
 
 
23
class LSInterior;
 
24
class QsciLexer;
 
25
 
 
26
class QFont;
 
27
class QString;
 
28
class QStringList;
 
29
 
 
30
#include <QtGui/QColor>
 
31
 
 
32
class LexerStorage {
 
33
public:
 
34
        /**
 
35
        * Returns lexer by name
 
36
        */
 
37
        QsciLexer* lexer(const QString& lexerName);
 
38
 
 
39
        /**
 
40
        * Returns lexer by file name
 
41
        */
 
42
        QsciLexer* lexerByFileName(const QString& fileName);
 
43
 
 
44
        /**
 
45
        * Returns lexer name by file name
 
46
        */
 
47
        QString lexerName(const QString& fileName);
 
48
        
 
49
        /**
 
50
        * Returns a list of available lexers
 
51
        */
 
52
        QStringList lexersList() const;
 
53
 
 
54
        /**
 
55
        * Updates currently existing lexers with new font and 
 
56
        * sets the default font for new lexers
 
57
        */
 
58
        void updateLexers(const QFont&);
 
59
 
 
60
        /**
 
61
        * Returns current line highlighting color for specified lexer
 
62
        */
 
63
        QColor curLineColor(const QString&) const;
 
64
        
 
65
        /**
 
66
        * Returns selection background color for specified lexer
 
67
        */
 
68
        QColor selectionBgColor(const QString&) const;
 
69
        
 
70
        /**
 
71
        * Returns LexerStorage singleton
 
72
        */
 
73
        static LexerStorage* instance();
 
74
 
 
75
        /**
 
76
        * Destructor
 
77
        */
 
78
        ~LexerStorage();
 
79
 
 
80
protected:
 
81
        LexerStorage();
 
82
        
 
83
private:
 
84
        static LexerStorage* instance_;
 
85
        LSInterior* lsInt_;
 
86
};
 
87
 
 
88
#endif // __JUFF_LEXER_STORAGE_H__