// Source file text lines store.
TextLinesStore textLinesStore;
textLinesStore.loadFile(inputFileName, inputEncoding, true);
// parsers factory
ParserFactory pf(catalogPath);
// Base editor to make primary parse
BaseEditor baseEditor(&pf, &textLinesStore);
baseEditor.setRegionMapper(&DString("rgb"), &DString("default"));
baseEditor.setFileType(DString("cpp"));
// Initial line count notify
baseEditor.lineCountEvent(textLinesStore.getLineCount());
// Iterate over text lines
for(int idx = 0; idx < textLinesStore.getLineCount(); idx++){
LineRegions *lr = baseEditor.getLineRegions(idx);
// Iterate over line regions
for(LineRegions *next = lr; next != null; lr = lr->next){
// work with this region:
// next->start
// next->end
// next->region
StyledRegion *sr = next->styled();
// colors:
// sr->fore, sr->back
};
};