Table of Contents

Class Utils

Namespace
Npp.DotNet.Plugin
Assembly
Npp.DotNet.Plugin.dll
public static class Utils
Inheritance
Utils
Inherited Members

Methods

CheckMenuItem(int, bool)

if a menu item (for your plugin's drop-down menu) has a checkmark, check/uncheck it, and call its associated funcId.

public static void CheckMenuItem(int funcId, bool isChecked)

Parameters

funcId int

the index of the menu item of interest

isChecked bool

whether the menu item should be checked

CheckMenuItemToggle(int, ref bool)

if a menu item (for your plugin's drop-down menu) has a checkmark:

  • if it's checked, uncheck it
  • if it's unchecked, check it. Either way, call its associated funcId.
public static void CheckMenuItemToggle(int funcId, ref bool isCurrentlyChecked)

Parameters

funcId int

the index of the menu item of interest

isCurrentlyChecked bool

whether the menu item is currently checked

GetCurrentScintilla()

public static IntPtr GetCurrentScintilla()

Returns

IntPtr

GetGatewayFactory()

public static Func<IScintillaGateway> GetGatewayFactory()

Returns

Func<IScintillaGateway>

MakeSeparator()

public static int MakeSeparator()

Returns

int

SetCommand(string, PluginFunc)

public static int SetCommand(string commandName, PluginFunc functionPointer)

Parameters

commandName string
functionPointer PluginFunc

Returns

int

SetCommand(string, PluginFunc, ShortcutKey)

public static int SetCommand(string commandName, PluginFunc functionPointer, ShortcutKey shortcut)

Parameters

commandName string
functionPointer PluginFunc
shortcut ShortcutKey

Returns

int

SetCommand(string, PluginFunc, ShortcutKey, bool)

public static int SetCommand(string commandName, PluginFunc functionPointer, ShortcutKey shortcut, bool checkOnInit)

Parameters

commandName string
functionPointer PluginFunc
shortcut ShortcutKey
checkOnInit bool

Returns

int