Hi,
I have an app acting as debugger and I need three markers
1. Marker to show erronous line in case of failed Lint check
2. Marker to show debug breakpoints
3. Marker to show current debugger line
The two are working fine but I want the third to be in its own margin and cannot get it to do it.
My problem is, I cannot find single method to assign a marker to a given Margin.
Is there such a method (since scintilla is said to have 5 margins)
I use wxSTC in case that will add anything and here is how I create them
//Margin and Marker Errors
SetMarginType(1, wxSTC_MARGIN_SYMBOL);
SetMarginWidth(1, 16);
SetMarginSensitive(1, false);
//fold margin
SetMarginType(2, wxSTC_MARGIN_SYMBOL);
SetMarginWidth(2, 16);
SetMarginSensitive(2, true);
SetMarginMask(2, wxSTC_MASK_FOLDERS);
SetFoldFlags(wxSTC_FOLDFLAG_LINEBEFORE_CONTRACTED | wxSTC_FOLDFLAG_LINEAFTER_CONTRACTED);
//Margin and Marker for Debug breakpoints currentline
SetMarginType(3, wxSTC_MARGIN_SYMBOL);
SetMarginWidth(3, 16);
SetMarginSensitive(3, true);
and here is how I define them
//debugger
MarkerDefineBitmap(HMARGIN_DEBUG_BREAKPOINT, wxBitmap(ConfigManager::Instance()->GetIconPath()+wxT("breakpoint.png"), wxBITMAP_TYPE_PNG));
//current debugger line
MarkerDefine(HMARGIN_DEBUG_CURRENT, wxSTC_MARK_ARROW, wxT("green"), wxT("green"));
//Marker for parsing errors
MarkerDefine(HMARGIN_PARSE_ERROR, wxSTC_MARK_SHORTARROW, *wxRED, *wxRED);
And finally when Line changes here is how I change themarker (and does not work as I expect)
m_editorPage->MarkerDeleteAll(HMARGIN_DEBUG_CURRENT);
m_editorPage->MarkerAdd(HMARGIN_DEBUG_CURRENT, GetLineNo());
m_editorPage->GotoLine(GetLineNo());
m_editorPage->EnsureCaretVisible();
Thanks in Advace,
Stefano