MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / Style_SetCurrentLineBackground

Function Style_SetCurrentLineBackground

src/Styles.c:2049–2069  ·  view source on GitHub ↗

============================================================================= Style_SetCurrentLineBackground()

Source from the content-addressed store, hash-verified

2047// Style_SetCurrentLineBackground()
2048//
2049void Style_SetCurrentLineBackground ( HWND hwnd )
2050{
2051 int rgb, iValue;
2052 // Use 2nd default style
2053 int iIdx = ( bUse2ndDefaultStyle ) ? 12 : 0;
2054 if ( bHiliteCurrentLine ) {
2055 if ( Style_StrGetColor ( FALSE, lexDefault.Styles[8 + iIdx].szValue, &rgb ) ) { // caret line back
2056 SendMessage ( hwnd, SCI_SETCARETLINEVISIBLE, TRUE, 0 );
2057 SendMessage ( hwnd, SCI_SETCARETLINEBACK, rgb, 0 );
2058 if ( Style_StrGetAlpha ( lexDefault.Styles[8 + iIdx].szValue, &iValue ) ) {
2059 SendMessage ( hwnd, SCI_SETCARETLINEBACKALPHA, iValue, 0 );
2060 } else {
2061 SendMessage ( hwnd, SCI_SETCARETLINEBACKALPHA, SC_ALPHA_NOALPHA, 0 );
2062 }
2063 } else {
2064 SendMessage ( hwnd, SCI_SETCARETLINEVISIBLE, FALSE, 0 );
2065 }
2066 } else {
2067 SendMessage ( hwnd, SCI_SETCARETLINEVISIBLE, FALSE, 0 );
2068 }
2069}
2070
2071
2072//=============================================================================

Callers 1

MsgCommandFunction · 0.85

Calls 2

Style_StrGetColorFunction · 0.85
Style_StrGetAlphaFunction · 0.85

Tested by

no test coverage detected