10 #include <QTextCharFormat> 16 class MultiLineScopedTextRange;
17 class ScopedTextRange;
18 class TextBufferChange;
20 class TextEditorController;
23 class TextScopeSelector;
43 QString
name() {
return name_; }
47 bool bold() {
return bold_; }
57 QColor foregroundColor_;
58 QColor backgroundColor_;
74 const QList<TextThemeRule*>&
rules() {
return themeRules_; }
77 void fillFormatForTextScopeList(
const TextScopeList *scopeList, QTextCharFormat* format );
79 QString
name() {
return name_; }
81 QString
uuid() {
return uuid_; }
82 void setUuid(
const QString& uuid ) { uuid_ = uuid; }
126 QColor backgroundColor_;
128 QColor foregroundColor_;
129 QColor invisiblesColor_;
130 QColor lineHighlightColor_;
131 QColor selectionColor_;
132 QColor findHighlightBackgroundColor_;
133 QColor findHighlightForegroundColor_;
134 QColor selectionBorderColor_;
135 QColor activeGuideColor_;
137 QColor bracketForegroundColor_;
138 QString bracketOptions_;
140 QColor bracketContentsForegroundColor_;
141 QString bracketContentsOptions_;
143 QString tagsOptions_;
147 QList<TextThemeRule*> themeRules_;
165 QList<QTextLayout::FormatRange> getLineFormatRanges(
int lineIdx );
170 void setThemeByName(
const QString& themeName );
171 QString themeName()
const;
177 QTextCharFormat getTextScopeFormat(QVector<ScopedTextRange *> &activeRanges);
178 void appendFormatRange(QList<QTextLayout::FormatRange>& rangeList,
int start,
int end, QVector<edbee::ScopedTextRange *> &activeRanges );
183 void invalidateLayouts();
214 TextTheme* readThemeFile(
const QString& fileName,
const QString&
name=QString() );
215 void listAllThemes(
const QString& themePath=QString() );
217 QString themeName(
int idx );
220 QString lastErrorMessage()
const;
221 void setTheme(
const QString& name,
TextTheme* theme );
224 void themePointerChanged(
const QString& name,
TextTheme* oldTheme,
TextTheme* newTheme );
230 QStringList themeNames_;
231 QHash<QString,TextTheme*> themeMap_;
233 QString lastErrorMessage_;
void setBackgroundColor(const QColor &color)
Definition: texttheme.h:85
This is the base and abstract class of a text document A TextDocument is the model part of the editor...
Definition: textdocument.h:40
QString bracketOptions()
Definition: texttheme.h:107
QColor selectionColor()
Definition: texttheme.h:94
TextScopeSelector * scopeSelector()
Definition: texttheme.h:44
QString tagsOptions()
Definition: texttheme.h:115
bool matchesScopeList(const TextScopeList *scopes)
This method checks if the given scopelist matches the scope selector.
Definition: texttheme.cpp:45
bool underline()
Definition: texttheme.h:49
The styles available in tmTheme files.
Definition: texttheme.h:35
void setBracketOptions(const QString &str)
Definition: texttheme.h:108
void setFindHighlightForegroundColor(const QColor &color)
Definition: texttheme.h:99
TextTheme * fallbackTheme() const
Definition: texttheme.h:219
void setName(const QString &name)
Definition: texttheme.h:80
QColor findHighlightBackgroundColor()
Definition: texttheme.h:96
This class is used to manage load 'themes'. This method loads only loads a theme if requested...
Definition: texttheme.h:203
QColor bracketForegroundColor()
Definition: texttheme.h:105
The texteditor manager, It manages all singleton objects for the editor It performs the initializatio...
Definition: edbee.h:24
int themeCount()
Definition: texttheme.h:216
QColor bracketContentsForegroundColor()
Definition: texttheme.h:110
const QList< TextThemeRule * > & rules()
Definition: texttheme.h:74
This class is used to return the style formats for rendering the texts.
Definition: texttheme.h:157
TextEditorController * controller()
Definition: texttheme.h:167
Our first version of scope-selector only support a list of scopes Thus the Descendant (space) selecto...
Definition: textdocumentscopes.h:113
QColor backgroundColor()
Definition: texttheme.h:84
QColor findHighlightForegroundColor()
Definition: texttheme.h:98
TextThemeRule(const QString &name, const QString &selector, QColor foreground=QColor(), QColor background=QColor(), bool bold=false, bool italic=false, bool underline=false)
Definition: texttheme.cpp:27
bool italic()
Definition: texttheme.h:48
bool bold()
Definition: texttheme.h:47
A list of text-scopes. on a certian location, usually more then one scope is available on a given loc...
Definition: textdocumentscopes.h:61
QColor lineHighlightColor()
Definition: texttheme.h:92
Copyright 2011-2013 - Reliable Bits Software by Blommers IT.
Definition: commentcommand.cpp:22
void fillFormat(QTextCharFormat *format)
Definition: texttheme.cpp:50
QString uuid()
Definition: texttheme.h:81
QColor backgroundColor()
Definition: texttheme.h:46
void setFindHighlightBackgroundColor(const QColor &color)
Definition: texttheme.h:97
QString name()
Definition: texttheme.h:79
QString bracketContentsOptions()
Definition: texttheme.h:112
QColor selectionBorderColor()
Definition: texttheme.h:100
QColor activeGuideColor()
Definition: texttheme.h:102
QColor caretColor()
Definition: texttheme.h:86
This class defines a single theme.
Definition: texttheme.h:68
void setCaretColor(const QColor &color)
Definition: texttheme.h:87
void setLineHighlightColor(const QColor &color)
Definition: texttheme.h:93
void setSelectionBorderColor(const QColor &color)
Definition: texttheme.h:101
void setTagsOptions(const QString &str)
Definition: texttheme.h:116
The texteditor works via the controller. The controller is the central point/mediater which maps/cont...
Definition: texteditorcontroller.h:37
void setActiveGuideColor(const QColor &color)
Definition: texttheme.h:103
void setSelectionColor(const QColor &color)
Definition: texttheme.h:95
QString name()
Definition: texttheme.h:43
void setBracketForegroundColor(const QColor &color)
Definition: texttheme.h:106
virtual ~TextThemeRule()
Definition: texttheme.cpp:39
QColor foregroundColor()
Definition: texttheme.h:88
void setInvisiblesColor(const QColor &color)
Definition: texttheme.h:91
void setBracketContentsOptions(const QString &str)
Definition: texttheme.h:113
QColor invisiblesColor()
Definition: texttheme.h:90
void setForegroundColor(const QColor &color)
Definition: texttheme.h:89
QColor foregroundColor()
Definition: texttheme.h:45
void setBracketContentsForegroundColor(const QColor &color)
Definition: texttheme.h:111
void setUuid(const QString &uuid)
Definition: texttheme.h:82