public static ushort AppendMenuItem (IntPtr parentRef, string title, MenuItemAttributes attributes, uint commandId)
		{
			ushort index;
			IntPtr str = CoreFoundation.CreateString (title);
			CarbonMenuStatus result = AppendMenuItemTextWithCFString (parentRef, str, attributes, commandId, out index);
			CoreFoundation.Release (str);
			CheckResult (result);
			return index;
		}
Ejemplo n.º 2
0
        public static ushort AppendMenuItem(IntPtr parentRef, string title, MenuItemAttributes attributes, uint commandId)
        {
            ushort           index;
            IntPtr           str    = CoreFoundation.CreateString(title);
            CarbonMenuStatus result = AppendMenuItemTextWithCFString(parentRef, str, attributes, commandId, out index);

            CoreFoundation.Release(str);
            CheckResult(result);
            return(index);
        }
		static extern CarbonMenuStatus InsertMenuItemTextWithCFString (IntPtr menuRef, IntPtr cfString, ushort afterItemIndex,
		                                                         MenuItemAttributes attributes, uint commandID, out ushort index);
		static extern CarbonMenuStatus AppendMenuItemTextWithCFString (IntPtr menuRef, IntPtr cfString, MenuItemAttributes attributes, uint commandId, out ushort index);
		public static void ChangeMenuItemAttributes (HIMenuItem item, MenuItemAttributes toSet, MenuItemAttributes toClear)
		{
			CheckResult (ChangeMenuItemAttributes (item.MenuRef, item.Index, toSet, toClear));
		}
		static extern CarbonMenuStatus ChangeMenuItemAttributes (IntPtr menu, ushort item, MenuItemAttributes setTheseAttributes, 
		                                                         MenuItemAttributes clearTheseAttributes);
Ejemplo n.º 7
0
 static extern CarbonMenuStatus InsertMenuItemTextWithCFString(IntPtr menuRef, IntPtr cfString, ushort afterItemIndex,
                                                               MenuItemAttributes attributes, uint commandID, out ushort index);
Ejemplo n.º 8
0
 static extern CarbonMenuStatus AppendMenuItemTextWithCFString(IntPtr menuRef, IntPtr cfString, MenuItemAttributes attributes, uint commandId, out ushort index);
Ejemplo n.º 9
0
 public static void ChangeMenuItemAttributes(HIMenuItem item, MenuItemAttributes toSet, MenuItemAttributes toClear)
 {
     CheckResult(ChangeMenuItemAttributes(item.MenuRef, item.Index, toSet, toClear));
 }
Ejemplo n.º 10
0
 static extern CarbonMenuStatus ChangeMenuItemAttributes(IntPtr menu, ushort item, MenuItemAttributes setTheseAttributes,
                                                         MenuItemAttributes clearTheseAttributes);
Ejemplo n.º 11
0
		public static ushort InsertMenuItem (IntPtr parentRef, string title, ushort afterItemIndex, MenuItemAttributes attributes, uint commandId)
		{
			IntPtr str = CoreFoundation.CreateString (title);
			CarbonMenuStatus result = InsertMenuItemTextWithCFString (parentRef, str, afterItemIndex, attributes, commandId);
			CoreFoundation.Release (str);
			CheckResult (result);
			return (ushort) (afterItemIndex + 1);
		}
Ejemplo n.º 12
0
        public static ushort InsertMenuItem(IntPtr parentRef, string title, ushort afterItemIndex, MenuItemAttributes attributes, uint commandId)
        {
            IntPtr           str    = CoreFoundation.CreateString(title);
            CarbonMenuStatus result = InsertMenuItemTextWithCFString(parentRef, str, afterItemIndex, attributes, commandId);

            CoreFoundation.Release(str);
            CheckResult(result);
            return((ushort)(afterItemIndex + 1));
        }