I have this STC that I use to show Error. As shown below, a marker appears on Line number which is not what I want.
I want only one Marker and it should go into symbols margin only.
Here is a code I use for margins and markers (stripped) and Shot.
What am I doing wrong?
Code: Select all
#define HBOOKMARK_MARKER 0x7
#define HBREAKPOINT_MARKER 0x8
#define HDEBUG_MARKER 0x9
#define HERROR_MARKER 0xA
#define HNUMBER_MARGIN_ID 0
#define HSEP_MARGIN_ID 1
#define HSYMBOLS_MARGIN_ID 2
#define HFOLD_MARGIN_ID 3
Code: Select all
SetMarginType(HNUMBER_MARGIN_ID, wxSTC_MARGIN_NUMBER);
SetMarginType(HSYMBOLS_MARGIN_ID, wxSTC_MARGIN_SYMBOL);
SetMarginWidth(HSYMBOLS_MARGIN_ID, 16);
// margin for bookmarks, breakpoints
SetMarginMask(HNUMBER_MARGIN_ID, ~(256 | 512 | 128 | 64 | wxSTC_MASK_FOLDERS));
// Fold margin - allow only folder symbols to display
//SetMarginMask(HFOLD_MARGIN_ID, wxSTC_MASK_FOLDERS);
// allow everything except for the folding symbols
SetMarginMask(HSYMBOLS_MARGIN_ID, ~(wxSTC_MASK_FOLDERS));
// Mark fold margin & symbols margins as sensitive
SetMarginSensitive(HNUMBER_MARGIN_ID, false);
SetMarginSensitive(HFOLD_MARGIN_ID, true);
SetMarginSensitive(HSYMBOLS_MARGIN_ID, true);
SetMarginType(2, wxSTC_MARGIN_SYMBOL);
SetMarginWidth(2, 16);
SetMarginMask(2, wxSTC_MASK_FOLDERS);
SetMarginSensitive(2, 1);
Code: Select all
//clear any previous error markers (page ==> wxSTC)
page->MarkerDeleteAll(HERROR_MARKER);
errorMsg = wxString::Format(_("%s on %s Line %d Near Position %d\n"), result.Error.c_str(),
result.File.c_str(), result.LineNumber, result.CharacterPosition);
page->MarkerAdd(result.LineNumber - 1, HERROR_MARKER);
page->GotoLine(result.LineNumber - 1);