@ollydbg and jens.
Well done, guys!
I would still like to see dimmer indentation guide lines, similar to what notepad++ uses.
I think it involves the setting of STYLE_INDENTGUIDE, but I don't know how to do it.
Thanks again,
Bob
Firstly, you can find in the scintilla document
http://www.scintilla.org/ScintillaDoc.html#BuildingScintillaStyle definition
While the style setting messages mentioned above change the style numbers associated with text, these messages define how those style numbers are interpreted visually. There are 256 lexer styles that can be set, numbered 0 to STYLE_MAX (255). Unless you use SCI_SETSTYLEBITS to change the number of style bits, styles 0 to 31 are used to set the text attributes. There are also some predefined numbered styles starting at 32, The following STYLE_* constants are defined.
STYLE_INDENTGUIDE 37 This style sets the foreground and background colours used when drawing the indentation guides.
note: we are only interest in
STYLE_INDENTGUIDE 37 Secondly, you can see the similar definition macros in, note: we are only interest in
STYLE_INDENTGUIDE 37 include\wxscintilla\include\wx\wxscintilla.h line 131
// Styles in range 32..38 are predefined for parts of the UI and are not used as normal styles.
// Style 39 is for future use.
#define wxSCI_STYLE_DEFAULT 32
#define wxSCI_STYLE_LINENUMBER 33
#define wxSCI_STYLE_BRACELIGHT 34
#define wxSCI_STYLE_BRACEBAD 35
#define wxSCI_STYLE_CONTROLCHAR 36
#define wxSCI_STYLE_INDENTGUIDE 37
#define wxSCI_STYLE_CALLTIP 38
#define wxSCI_STYLE_LASTPREDEFINED 39
#define wxSCI_STYLE_MAX 255
So, in wxScintilla, they use
wxSCI_STYLE_INDENTGUIDE.
Thirdly, I found the code in
sdk\wxscintilla\src\wxscintilla.cpp line 667
// Set the foreground colour of a style.
void wxScintilla::StyleSetForeground (int style, const wxColour& fore)
{
SendMsg(SCI_STYLESETFORE, style, wxColourAsLong(fore));
}
Forthly, I think you can do this in the function below:
sdk\editorcolourset.cpp line 434
void EditorColourSet::Apply(HighlightLanguage lang, cbStyledTextCtrl* control)
{
......
control->StyleSetForeground(wxSCI_STYLE_INDENTGUIDE, Dimmer color like comment text);
......
}
Finally, there is only one last question:
How can I get the "Dimmer color like comment text" value?
Any comments?