Source Code (Use browser search to find items of interest.)
Class Index
kdelibs'CHighlight (./kdelibs/kwrite/highlight.h:412)
class CHighlight : public GenHighlight {
public:
CHighlight(const QString &name);
virtual ~CHighlight();
protected:
virtual void createItemData(ItemDataList &);
virtual void makeContextList();
virtual void setKeywords(HlKeyword *keyword, HlKeyword *dataType);
};
kdelibs'CHighlight::CHighlight() (./kdelibs/kwrite/highlight.cpp:1128)
CHighlight::CHighlight(const QString &name) : GenHighlight(name) {
iWildcards = "*.c";
iMimetypes = "text/x-c-src";
}
kdelibs'CHighlight::~CHighlight() (./kdelibs/kwrite/highlight.cpp:1133)
CHighlight::~CHighlight() {
}
kdelibs'CHighlight::createItemData() (./kdelibs/kwrite/highlight.cpp:1136)
void CHighlight::createItemData(ItemDataList &list) {
list.append(new ItemData(I18N_NOOP("Normal Text" ),dsNormal));
list.append(new ItemData(I18N_NOOP("Keyword" ),dsKeyword));
list.append(new ItemData(I18N_NOOP("Data Type" ),dsDataType));
list.append(new ItemData(I18N_NOOP("Decimal" ),dsDecVal));
list.append(new ItemData(I18N_NOOP("Octal" ),dsBaseN));
list.append(new ItemData(I18N_NOOP("Hex" ),dsBaseN));
list.append(new ItemData(I18N_NOOP("Float" ),dsFloat));
list.append(new ItemData(I18N_NOOP("Char" ),dsChar));
list.append(new ItemData(I18N_NOOP("String" ),dsString));
list.append(new ItemData(I18N_NOOP("String Char" ),dsChar));
list.append(new ItemData(I18N_NOOP("Comment" ),dsComment));
list.append(new ItemData(I18N_NOOP("Symbol" ),dsNormal));
list.append(new ItemData(I18N_NOOP("Preprocessor"),dsOthers));
list.append(new ItemData(I18N_NOOP("Prep. Lib" ),dsOthers,Qt::darkYellow,Qt::yellow,false,false));
}
kdelibs'CHighlight::makeContextList() (./kdelibs/kwrite/highlight.cpp:1155)
void CHighlight::makeContextList() {
HlContext *c;
HlKeyword *keyword, *dataType;
//normal context
contextList[0] = c = new HlContext(0,0);
c->items.append(keyword = new HlKeyword(1,0));
c->items.append(dataType = new HlKeyword(2,0));
c->items.append(new HlCFloat(6,0));
c->items.append(new HlCOct(4,0));
c->items.append(new HlCHex(5,0));
c->items.append(new HlCInt(3,0));
c->items.append(new HlCChar(7,0));
c->items.append(new HlCharDetect(8,1,'"'));
c->items.append(new Hl2CharDetect(10,2, '/', '/'));
c->items.append(new Hl2CharDetect(10,3, '/', '*'));
c->items.append(new HlCSymbol(11,0));
c->items.append(new HlCPrep(12,4));
//string context
contextList[1] = c = new HlContext(8,0);
c->items.append(new HlLineContinue(8,6));
c->items.append(new HlCStringChar(9,1));
c->items.append(new HlCharDetect(8,0,'"'));
//one line comment context
contextList[2] = new HlContext(10,0);
//multi line comment context
contextList[3] = c = new HlContext(10,3);
c->items.append(new Hl2CharDetect(10,0, '*', '/'));
//preprocessor context
contextList[4] = c = new HlContext(12,0);
c->items.append(new HlLineContinue(12,7));
c->items.append(new HlRangeDetect(13,4, '\"', '\"'));
c->items.append(new HlRangeDetect(13,4, '<', '>'));
c->items.append(new Hl2CharDetect(10,2, '/', '/'));
c->items.append(new Hl2CharDetect(10,5, '/', '*'));
//preprocessor multiline comment context
contextList[5] = c = new HlContext(10,5);
c->items.append(new Hl2CharDetect(10,4, '*', '/'));
//string line continue
contextList[6] = new HlContext(0,1);
//preprocessor string line continue
contextList[7] = new HlContext(0,4);
setKeywords(keyword, dataType);
}
kdelibs'CHighlight::setKeywords() (./kdelibs/kwrite/highlight.cpp:1201)
void CHighlight::setKeywords(HlKeyword *keyword, HlKeyword *dataType) {
keyword->addList(cKeywords);
dataType->addList(cTypes);
}