|
|
|
@ -11,6 +11,32 @@ using System.Collections; |
|
|
|
|
|
|
|
|
|
|
|
namespace ICSharpCode.Core |
|
|
|
namespace ICSharpCode.Core |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// Creates menu items from a location in the addin tree.
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <attribute name="type">
|
|
|
|
|
|
|
|
/// This attribute must be specified and one of these values:
|
|
|
|
|
|
|
|
/// Separator, CheckBox, Item=Command, Menu (=with subitems),
|
|
|
|
|
|
|
|
/// Builder (=class implementing ISubmenuBuilder)
|
|
|
|
|
|
|
|
/// </attribute>
|
|
|
|
|
|
|
|
/// <attribute name="loadclasslazy">
|
|
|
|
|
|
|
|
/// Only for the type "Item"/"Command".
|
|
|
|
|
|
|
|
/// When set to false, the command class is loaded
|
|
|
|
|
|
|
|
/// immediately instead of the usual lazy-loading.
|
|
|
|
|
|
|
|
/// </attribute>
|
|
|
|
|
|
|
|
/// <attribute name="icon">
|
|
|
|
|
|
|
|
/// Icon of the menu item.
|
|
|
|
|
|
|
|
/// </attribute>
|
|
|
|
|
|
|
|
/// <attribute name="label">
|
|
|
|
|
|
|
|
/// Label of the menu item.
|
|
|
|
|
|
|
|
/// </attribute>
|
|
|
|
|
|
|
|
/// <attribute name="class">
|
|
|
|
|
|
|
|
/// Command class that is run when item is clicked.
|
|
|
|
|
|
|
|
/// </attribute>
|
|
|
|
|
|
|
|
/// <returns>
|
|
|
|
|
|
|
|
/// A ToolStrip* object, depending on the type attribute.
|
|
|
|
|
|
|
|
/// </returns>
|
|
|
|
|
|
|
|
/// <conditions>MenuMode</conditions>
|
|
|
|
public class MenuItemDoozer : IDoozer |
|
|
|
public class MenuItemDoozer : IDoozer |
|
|
|
{ |
|
|
|
{ |
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
@ -35,7 +61,6 @@ namespace ICSharpCode.Core |
|
|
|
case "CheckBox": |
|
|
|
case "CheckBox": |
|
|
|
return new MenuCheckBox(codon, caller); |
|
|
|
return new MenuCheckBox(codon, caller); |
|
|
|
case "Item": |
|
|
|
case "Item": |
|
|
|
return new MenuCommand(codon, caller, createCommand); |
|
|
|
|
|
|
|
case "Command": |
|
|
|
case "Command": |
|
|
|
return new MenuCommand(codon, caller, createCommand); |
|
|
|
return new MenuCommand(codon, caller, createCommand); |
|
|
|
case "Menu": |
|
|
|
case "Menu": |
|
|
|
|