Class Utils
public static class Utils
- Inheritance
-
Utils
- Inherited Members
Methods
CheckMenuItem(int, bool)
Sets the menu state of the plugin command associated with funcId
, if any.
public static void CheckMenuItem(int funcId, bool isChecked)
Parameters
funcId
intIndex within FuncItems of the menu item to check/uncheck.
isChecked
boolWhether the menu item should be checked or not.
CheckMenuItemToggle(int, ref bool)
If a menu item (in your plugin's drop-down menu) has a checkmark:
- if it's checked, uncheck it
- if it's unchecked, check it
public static void CheckMenuItemToggle(int funcId, ref bool isCurrentlyChecked)
Parameters
funcId
intIndex within FuncItems of the menu item to check/uncheck.
isCurrentlyChecked
boolWhether the menu item should be checked or not.
GetCurrentScintilla()
Gets the window handle of the currently active Scintilla view.
public static IntPtr GetCurrentScintilla()
Returns
- IntPtr
The window handle of either:
- the main Scintilla view
- the second Scintilla view
GetGatewayFactory()
public static Func<IScintillaGateway> GetGatewayFactory()
Returns
MakeSeparator()
Adds a dividing line to the plugin command menu.
public static int MakeSeparator()
Returns
SetCommand(string, PluginFunc)
Initializes a plugin command with no keyboard shortcut.
public static int SetCommand(string commandName, PluginFunc functionPointer)
Parameters
commandName
stringCommand name to display in the plugin menu.
functionPointer
PluginFuncA delegate of type PluginFunc.
Returns
SetCommand(string, PluginFunc, ShortcutKey)
Initializes a plugin command with an optional keyboard shortcut.
public static int SetCommand(string commandName, PluginFunc functionPointer, ShortcutKey shortcut)
Parameters
commandName
stringCommand name to display in the plugin menu.
functionPointer
PluginFuncA delegate of type PluginFunc.
shortcut
ShortcutKeyA ShortcutKey.
Returns
SetCommand(string, PluginFunc, ShortcutKey, bool)
Initializes a plugin command with an optional keyboard shortcut and initial menu state.
public static int SetCommand(string commandName, PluginFunc functionPointer, ShortcutKey shortcut, bool checkOnInit)
Parameters
commandName
stringCommand name to display in the plugin menu.
functionPointer
PluginFuncA delegate of type PluginFunc.
shortcut
ShortcutKeyA ShortcutKey.
checkOnInit
boolWhether or not this command's menu item should initially be checked.