Add new plugin API: NPPM_GETTOOLBARICONSETMODE to get toolbar icon set choice

Fix #16547, close #16548
This commit is contained in:
Shridhar Kumar 2025-05-12 18:34:57 -04:00 committed by Don HO
parent 0e249b1bb9
commit 5406b82fb4
2 changed files with 12 additions and 0 deletions

View File

@ -1017,6 +1017,13 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 };
// ...
// }
#define NPPM_GETTOOLBARICONSETCHOICE (NPPMSG + 118)
// BOOL NPPM_GETTOOLBARICONSETCHOICE(0, 0)
// Get Notepad++ toobar icon set choice (Fluent UI: small, Fluent UI: large, Filled Fluent UI: small, Filled Fluent UI: large and Standard icons: small.
// wParam: 0 (not used)
// lParam: 0 (not used)
// Return toolbar icon set choice as an integer value. Here are 5 possible values:
// 0 (Fluent UI: small), 1 (Fluent UI: large), 2 (Filled Fluent UI: small), 3 (Filled Fluent UI: large) and 4 (Standard icons: small).
// For RUNCOMMAND_USER
#define VAR_NOT_RECOGNIZED 0

View File

@ -3107,6 +3107,11 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
return TRUE;
}
case NPPM_GETTOOLBARICONSETCHOICE:
{
return _toolBar.getState();
}
case NPPM_SETMENUITEMCHECK:
{
::CheckMenuItem(_mainMenuHandle, static_cast<UINT>(wParam), MF_BYCOMMAND | (static_cast<BOOL>(lParam) ? MF_CHECKED : MF_UNCHECKED));