mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-14 21:09:05 +08:00
+ add: Customize Scheme's Default Style for Inline-IME color
This commit is contained in:
parent
ca5fe236d5
commit
aa6ad3be63
@ -927,5 +927,7 @@
|
||||
#define IDS_LEX_STR_63349 63349
|
||||
#define IDS_LEX_STR_63350 63350
|
||||
#define IDS_LEX_STR_63351 63351
|
||||
#define IDS_LEX_STR_63352 63352
|
||||
#define IDS_LEX_STR_63353 63353
|
||||
|
||||
#endif //_COMMON_RES_H_
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -6773,7 +6773,7 @@ void EditUpdateUrlHotspots(HWND hwnd, DocPos startPos, DocPos endPos, bool bActi
|
||||
// mark this match
|
||||
SciCall_StartStyling(iPos);
|
||||
if (bActiveHotspot)
|
||||
SciCall_SetStyling((DocPosCR)mlen, (char)Style_GetHotspotStyleID());
|
||||
SciCall_SetStyling((DocPosCR)mlen, Style_GetHotspotStyleID());
|
||||
else
|
||||
EditFinalizeStyling(hwnd, endPos);
|
||||
|
||||
@ -6852,7 +6852,7 @@ void EditHideNotMarkedLineRange(HWND hwnd, DocPos iStartPos, DocPos iEndPos, boo
|
||||
const DocPos begPos = SciCall_PositionFromLine(iStartLine);
|
||||
const DocPos lnLen = SciCall_LineLength(iStartLine);
|
||||
SciCall_StartStyling(begPos);
|
||||
SciCall_SetStyling((DocPosCR)lnLen, (char)Style_GetInvisibleStyleID());
|
||||
SciCall_SetStyling((DocPosCR)lnLen, Style_GetInvisibleStyleID());
|
||||
}
|
||||
|
||||
int level = baseLevel;
|
||||
@ -6868,7 +6868,7 @@ void EditHideNotMarkedLineRange(HWND hwnd, DocPos iStartPos, DocPos iEndPos, boo
|
||||
const DocPos begPos = SciCall_PositionFromLine(iLine);
|
||||
const DocPos lnLen = SciCall_LineLength(iLine);
|
||||
SciCall_StartStyling(begPos);
|
||||
SciCall_SetStyling((DocPosCR)lnLen, (char)Style_GetInvisibleStyleID());
|
||||
SciCall_SetStyling((DocPosCR)lnLen, Style_GetInvisibleStyleID());
|
||||
|
||||
if (level == baseLevel) {
|
||||
SciCall_SetFoldLevel(iLine - 1, SC_FOLDLEVELHEADERFLAG | level++);
|
||||
|
||||
@ -5925,7 +5925,7 @@ void OpenHotSpotURL(DocPos position, bool bForceBrowser)
|
||||
{
|
||||
char const cStyle = SciCall_GetStyleAt(position);
|
||||
|
||||
if (cStyle != (char)Style_GetHotspotStyleID()) { return; }
|
||||
if ((int)cStyle != Style_GetHotspotStyleID()) { return; }
|
||||
if (!SciCall_StyleGetHotspot(Style_GetHotspotStyleID())) { return; }
|
||||
|
||||
// get left most position of style
|
||||
|
||||
@ -326,7 +326,7 @@ DeclareSciCallV1(SetWrapMode, SETWRAPMODE, int, mode)
|
||||
DeclareSciCallR1(StyleGetFore, STYLEGETFORE, COLORREF, char, style)
|
||||
DeclareSciCallR1(StyleGetBack, STYLEGETBACK, COLORREF, char, style)
|
||||
DeclareSciCallR1(GetStyleAt, GETSTYLEAT, char, DocPos, position)
|
||||
DeclareSciCallV2(SetStyling, SETSTYLING, DocPosCR, length, char, style)
|
||||
DeclareSciCallV2(SetStyling, SETSTYLING, DocPosCR, length, int, style)
|
||||
DeclareSciCallV1(StartStyling, STARTSTYLING, DocPos, position)
|
||||
DeclareSciCallR0(GetEndStyled, GETENDSTYLED, DocPos)
|
||||
DeclareSciCallR1(StyleGetHotspot, STYLEGETHOTSPOT, bool, int, iStyle)
|
||||
|
||||
71
src/Styles.c
71
src/Styles.c
@ -75,32 +75,6 @@ bool ChooseFontDirectWrite(HWND hwnd, const WCHAR* localeName, UINT dpi, LPCHOOS
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
|
||||
typedef enum {
|
||||
STY_DEFAULT = 0,
|
||||
STY_MARGIN = 1,
|
||||
STY_BRACE_OK = 2,
|
||||
STY_BRACE_BAD = 3,
|
||||
STY_CTRL_CHR = 4,
|
||||
STY_INDENT_GUIDE = 5,
|
||||
STY_SEL_TXT = 6,
|
||||
STY_WHITESPACE = 7,
|
||||
STY_CUR_LN_BCK = 8,
|
||||
STY_CARET = 9,
|
||||
STY_LONG_LN_MRK = 10,
|
||||
STY_X_LN_SPACE = 11,
|
||||
STY_BOOK_MARK = 12,
|
||||
STY_MARK_OCC = 13,
|
||||
STY_URL_HOTSPOT = 14,
|
||||
STY_INVISIBLE = 15,
|
||||
STY_READONLY = 16
|
||||
|
||||
// MAX = 127
|
||||
}
|
||||
LexDefaultStyles;
|
||||
|
||||
|
||||
|
||||
// This array holds all the lexers...
|
||||
// Don't forget to change the number of the lexer for HTML and XML
|
||||
// in Notepad2.c ParseCommandLine() if you change this array!
|
||||
@ -758,6 +732,20 @@ void Style_SetLexer(HWND hwnd, PEDITLEXER pLexNew)
|
||||
}
|
||||
SendMessage(hwnd, SCI_INDICSETSTYLE, INDIC_NP3_MARK_OCCURANCE, iValue);
|
||||
|
||||
|
||||
// Inline-IME Color
|
||||
#define _SC_INDIC_IME_INPUT (INDIC_IME + 0)
|
||||
#define _SC_INDIC_IME_TARGET (INDIC_IME + 1)
|
||||
#define _SC_INDIC_IME_CONVERTED (INDIC_IME + 2)
|
||||
#define _SC_INDIC_IME_UNKNOWN INDIC_IME_MAX
|
||||
|
||||
if (Style_StrGetColor(true, pCurrentStandard->Styles[STY_IME_COLOR].szValue, &dColor)) { // IME foregr
|
||||
SendMessage(hwnd, SCI_INDICSETFORE, _SC_INDIC_IME_INPUT, dColor);
|
||||
SendMessage(hwnd, SCI_INDICSETFORE, _SC_INDIC_IME_TARGET, dColor);
|
||||
SendMessage(hwnd, SCI_INDICSETFORE, _SC_INDIC_IME_CONVERTED, dColor);
|
||||
SendMessage(hwnd, SCI_INDICSETFORE, _SC_INDIC_IME_UNKNOWN, dColor);
|
||||
}
|
||||
|
||||
// More default values...
|
||||
|
||||
if (pLexNew != &lexANSI) {
|
||||
@ -1064,16 +1052,6 @@ void Style_SetLexer(HWND hwnd, PEDITLEXER pLexNew)
|
||||
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//
|
||||
// Style_GetHotspotStyleID()
|
||||
//
|
||||
int Style_GetHotspotStyleID()
|
||||
{
|
||||
return (STYLE_MAX - STY_URL_HOTSPOT);
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//
|
||||
// Style_SetUrlHotSpot()
|
||||
@ -1120,16 +1098,6 @@ void Style_SetUrlHotSpot(HWND hwnd, bool bHotSpot)
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//
|
||||
// Style_GetInvisibleStyleID()
|
||||
//
|
||||
int Style_GetInvisibleStyleID()
|
||||
{
|
||||
//return STYLE_FOLDDISPLAYTEXT;
|
||||
return (STYLE_MAX - STY_INVISIBLE);
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//
|
||||
@ -1145,17 +1113,6 @@ void Style_SetInvisible(HWND hwnd, bool bInvisible)
|
||||
}
|
||||
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//
|
||||
// Style_GetReadonlyStyleID()
|
||||
//
|
||||
int Style_GetReadonlyStyleID()
|
||||
{
|
||||
return (STYLE_MAX - STY_READONLY);
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//
|
||||
// Style_SetInvisible()
|
||||
|
||||
@ -82,9 +82,6 @@ INT_PTR CALLBACK Styles_ConfigDlgProc(HWND,UINT,WPARAM,LPARAM);
|
||||
HWND Style_CustomizeSchemesDlg(HWND);
|
||||
INT_PTR CALLBACK Style_SelectLexerDlgProc(HWND,UINT,WPARAM,LPARAM);
|
||||
void Style_SelectLexerDlg(HWND);
|
||||
int Style_GetHotspotStyleID();
|
||||
int Style_GetInvisibleStyleID();
|
||||
int Style_GetReadonlyStyleID();
|
||||
bool Style_StrGetWeightValue(LPCWSTR,int*);
|
||||
void Style_AppendWeightStr(LPWSTR, int, int);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user