|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.rococoa.cocoa.foundation.NSObject
org.rococoa.cocoa.appkit.NSMenu
public abstract class NSMenu
This file was autogenerated by JNAerator,
a tool written by Olivier Chafik that uses a few opensource projects..
For help, please visit NativeLibs4Java, Rococoa, or JNA.
Nested Class Summary | |
---|---|
static class |
NSMenu.__mFlags
|
static class |
NSMenu._class_
|
Nested classes/interfaces inherited from interface org.rococoa.cocoa.foundation.protocols.NSCopying |
---|
NSCopying._static_ |
Nested classes/interfaces inherited from interface org.rococoa.cocoa.foundation.protocols.NSCoding |
---|
NSCoding._static_ |
Nested classes/interfaces inherited from interface org.rococoa.cocoa.foundation.protocols.NSObject |
---|
NSObject._static_ |
Constructor Summary | |
---|---|
NSMenu()
|
Method Summary | |
---|---|
abstract void |
addItem(NSMenuItem newItem)
Appends an item to the end of the menu. |
abstract NSMenuItem |
addItemWithTitle_action_keyEquivalent(NSString aString,
Selector aSelector,
NSString charCode)
Appends a new menu item with the given properties to the end of the menu. |
static NSMenu |
alloc()
|
abstract boolean |
allowsContextMenuPlugIns()
Determines whether contextual menu plugins may be appended to the menu, if used as a context menu. |
NSSubmenuAction |
as_NSMenu_NSSubmenuAction()
|
abstract boolean |
autoenablesItems()
Original signature : -(BOOL)autoenablesItems native declaration : NSMenu.h:129 |
abstract void |
cancelTracking()
Dismisses the menu and ends all menu tracking Original signature : -(void)cancelTracking native declaration : NSMenu.h:155 |
abstract void |
cancelTrackingWithoutAnimation()
Dismisses the menu immediately, without any fade or other effect, and ends all menu tracking Original signature : -(void)cancelTrackingWithoutAnimation native declaration : NSMenu.h:158 |
static NSMenu |
createWithTitle(NSString aTitle)
Factory method |
abstract NSMenuDelegate |
delegate()
Original signature : -(id native declaration : NSMenu.h:148 |
abstract NSFont |
font()
Sets the font for the menu. |
static NSMenu._class_ |
getNSClass()
|
abstract void |
helpRequested(NSEvent eventPtr)
Original signature : -(void)helpRequested:(NSEvent*) native declaration : NSMenu.h:192 |
abstract NSMenuItem |
highlightedItem()
Returns the highlighted item in the menu, or nil if no item in the menu is highlighted Original signature : -(NSMenuItem*)highlightedItem native declaration : NSMenu.h:161 |
abstract NSInteger |
indexOfItem(NSMenuItem index)
Returns the index of the item in the menu, or -1 if the item is not present in the menu Original signature : -(NSInteger)indexOfItem:(NSMenuItem*) native declaration : NSMenu.h:114 |
abstract NSInteger |
indexOfItemWithRepresentedObject(ObjCObject object)
Original signature : -(NSInteger)indexOfItemWithRepresentedObject:(id) native declaration : NSMenu.h:119 |
abstract NSInteger |
indexOfItemWithSubmenu(NSMenu submenu)
Original signature : -(NSInteger)indexOfItemWithSubmenu:(NSMenu*) native declaration : NSMenu.h:120 |
abstract NSInteger |
indexOfItemWithTag(NSInteger aTag)
Original signature : -(NSInteger)indexOfItemWithTag:(NSInteger) native declaration : NSMenu.h:118 |
abstract NSInteger |
indexOfItemWithTarget_andAction(ObjCObject target,
Selector actionSelector)
Original signature : -(NSInteger)indexOfItemWithTarget:(id) andAction:(SEL) native declaration : NSMenu.h:121 |
abstract NSInteger |
indexOfItemWithTitle(NSString aTitle)
Returns the first item in the menu that matches the given property, or -1 if no item in the menu matches. |
abstract NSMenu |
initWithTitle(NSString aTitle)
Designated initializer. |
abstract void |
insertItem_atIndex(NSMenuItem newItem,
NSInteger index)
Inserts a menu item at the given index, which must be at least zero and no more than the receiver's item count. |
abstract NSMenuItem |
insertItemWithTitle_action_keyEquivalent_atIndex(NSString aString,
Selector aSelector,
NSString charCode,
NSInteger index)
Inserts a new menu item with the given title, action, and key equivalent, at the given index. |
abstract boolean |
isTornOff()
Original signature : -(BOOL)isTornOff native declaration : NSMenu.h:193 |
abstract NSArray |
itemArray()
Returns an array containing the receiver's menu items. |
abstract NSMenuItem |
itemAtIndex(NSInteger index)
Returns the item at the given index, which must be at least zero and less than the number of items. |
abstract void |
itemChanged(NSMenuItem item)
This method is called when a menu item's enabled state, submenu, title, attributed title, image, key equivalent, key equivalent modifier mask, alternate status, indent, tooltip, view, or visibility (via isHidden) changes. |
abstract NSMenuItem |
itemWithTag(NSInteger tag)
Original signature : -(NSMenuItem*)itemWithTag:(NSInteger) native declaration : NSMenu.h:125 |
abstract NSMenuItem |
itemWithTitle(NSString aTitle)
Returns the first item in the menu with the given property, or nil if no item in the menu matches. |
abstract org.rococoa.cocoa.CGFloat |
menuBarHeight()
If called on the main menu, returns the height of the menu bar in pixels. |
static boolean |
menuBarVisible()
Original signature : +(BOOL)menuBarVisible native declaration : NSMenu.h:70 |
abstract boolean |
menuChangedMessagesEnabled()
Original signature : -(BOOL)menuChangedMessagesEnabled native declaration : NSMenu.h:191 |
static Pointer |
menuZone()
Returns the zone used to allocate NSMenu objects. |
abstract org.rococoa.cocoa.CGFloat |
minimumWidth()
Set the minimum width of the menu, in screen coordinates. |
static NSMenu |
new_()
|
abstract NSInteger |
numberOfItems()
Returns the number of menu items in the menu. |
abstract void |
performActionForItemAtIndex(NSInteger index)
Triggers the action for the item at the given index in the receiver. |
abstract boolean |
performKeyEquivalent(NSEvent theEvent)
Attempts to perform the given key equivalent. |
static void |
popUpContextMenu_withEvent_forView_withFont(NSMenu menu,
NSEvent event,
NSView view,
NSFont font)
Original signature : +(void)popUpContextMenu:(NSMenu*) withEvent:(NSEvent*) forView:(NSView*) withFont:(NSFont*) native declaration : NSMenu.h:62 |
static void |
popUpContextMenu_withEvent_forView(NSMenu menu,
NSEvent event,
NSView view)
Original signature : +(void)popUpContextMenu:(NSMenu*) withEvent:(NSEvent*) forView:(NSView*) native declaration : NSMenu.h:61 |
abstract void |
removeAllItems()
Removes all items. |
abstract void |
removeItem(NSMenuItem item)
Removes the item from the menu. |
abstract void |
removeItemAtIndex(NSInteger index)
Removes the item at the given index, which must be at least zero and less than the number of items. |
abstract void |
setAllowsContextMenuPlugIns(boolean allows)
Original signature : -(void)setAllowsContextMenuPlugIns:(BOOL) native declaration : NSMenu.h:180 |
abstract void |
setAutoenablesItems(boolean flag)
Set and get whether the menu autoenables items. |
abstract void |
setDelegate(NSMenuDelegate anObject)
Set and get the delegate for the menu. |
abstract void |
setFont(NSFont font)
Original signature : -(void)setFont:(NSFont*) native declaration : NSMenu.h:175 |
static void |
setMenuBarVisible(boolean visible)
Determines whether the menu bar is visible for this application. |
abstract void |
setMenuChangedMessagesEnabled(boolean flag)
In SnowLeopard, the following methods no longer do anything useful. |
abstract void |
setMinimumWidth(org.rococoa.cocoa.CGFloat width)
Original signature : -(void)setMinimumWidth:(CGFloat) native declaration : NSMenu.h:166 |
abstract void |
setShowsStateColumn(boolean showsState)
Determines whether the menu contains a column for the state image. |
abstract void |
setSubmenu_forItem(NSMenu aMenu,
NSMenuItem anItem)
Same as [anItem setSubmenu:aMenu]. |
abstract void |
setSupermenu(NSMenu supermenu)
If a menu item has the receiver as a submenu, then this method will be called when the menu containing that item changes. |
abstract void |
setTitle(NSString aString)
Set and get the menu's title. |
abstract boolean |
showsStateColumn()
Original signature : -(BOOL)showsStateColumn native declaration : NSMenu.h:184 |
abstract NSObject |
size()
Returns the size of the menu, in screen coordinates. |
abstract NSMenu |
supermenu()
Returns the menu containing the item that has the receiver as a submenu, or nil if this menu is not the submenu of an item in a menu. |
abstract NSString |
title()
Original signature : -(NSString*)title native declaration : NSMenu.h:54 |
abstract void |
update()
If the receiver is set to autoenable items, then this triggers autovalidation of all menu items according to the NSMenuValidation informal protocol; otherwise this does nothing. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.rococoa.cocoa.foundation.protocols.NSCopying |
---|
copyWithZone |
Methods inherited from interface org.rococoa.cocoa.foundation.protocols.NSCoding |
---|
encodeWithCoder, initWithCoder |
Methods inherited from interface org.rococoa.ObjCObject |
---|
id |
Methods inherited from interface org.rococoa.cocoa.foundation.protocols.NSObject |
---|
autorelease, class_, conformsToProtocol, hash, isEqual, isMemberOfClass, isProxy, performSelector_withObject_withObject, performSelector_withObject, performSelector, respondsToSelector, self, superclass, zone |
Constructor Detail |
---|
public NSMenu()
Method Detail |
---|
public NSSubmenuAction as_NSMenu_NSSubmenuAction()
public abstract NSMenu initWithTitle(NSString aTitle)
-(id)initWithTitle:(NSString*)
public static NSMenu createWithTitle(NSString aTitle)
initWithTitle(org.rococoa.cocoa.foundation.NSString)
public abstract void setTitle(NSString aString)
-(void)setTitle:(NSString*)
public abstract NSString title()
-(NSString*)title
public static void popUpContextMenu_withEvent_forView(NSMenu menu, NSEvent event, NSView view)
+(void)popUpContextMenu:(NSMenu*) withEvent:(NSEvent*) forView:(NSView*)
public static void popUpContextMenu_withEvent_forView_withFont(NSMenu menu, NSEvent event, NSView view, NSFont font)
+(void)popUpContextMenu:(NSMenu*) withEvent:(NSEvent*) forView:(NSView*) withFont:(NSFont*)
public static void setMenuBarVisible(boolean visible)
+(void)setMenuBarVisible:(BOOL)
public static boolean menuBarVisible()
+(BOOL)menuBarVisible
public abstract NSMenu supermenu()
-(NSMenu*)supermenu
public abstract void setSupermenu(NSMenu supermenu)
-(void)setSupermenu:(NSMenu*)
public abstract void insertItem_atIndex(NSMenuItem newItem, NSInteger index)
-(void)insertItem:(NSMenuItem*) atIndex:(NSInteger)
public abstract void addItem(NSMenuItem newItem)
-(void)addItem:(NSMenuItem*)
public abstract NSMenuItem insertItemWithTitle_action_keyEquivalent_atIndex(NSString aString, Selector aSelector, NSString charCode, NSInteger index)
-(NSMenuItem*)insertItemWithTitle:(NSString*) action:(SEL) keyEquivalent:(NSString*) atIndex:(NSInteger)
public abstract NSMenuItem addItemWithTitle_action_keyEquivalent(NSString aString, Selector aSelector, NSString charCode)
-(NSMenuItem*)addItemWithTitle:(NSString*) action:(SEL) keyEquivalent:(NSString*)
public abstract void removeItemAtIndex(NSInteger index)
-(void)removeItemAtIndex:(NSInteger)
public abstract void removeItem(NSMenuItem item)
-(void)removeItem:(NSMenuItem*)
public abstract void setSubmenu_forItem(NSMenu aMenu, NSMenuItem anItem)
-(void)setSubmenu:(NSMenu*) forItem:(NSMenuItem*)
public abstract void removeAllItems()
-(void)removeAllItems
public abstract NSArray itemArray()
-(NSArray*)itemArray
public abstract NSInteger numberOfItems()
-(NSInteger)numberOfItems
public abstract NSMenuItem itemAtIndex(NSInteger index)
-(NSMenuItem*)itemAtIndex:(NSInteger)
public abstract NSInteger indexOfItem(NSMenuItem index)
-(NSInteger)indexOfItem:(NSMenuItem*)
public abstract NSInteger indexOfItemWithTitle(NSString aTitle)
-(NSInteger)indexOfItemWithTitle:(NSString*)
public abstract NSInteger indexOfItemWithTag(NSInteger aTag)
-(NSInteger)indexOfItemWithTag:(NSInteger)
public abstract NSInteger indexOfItemWithRepresentedObject(ObjCObject object)
-(NSInteger)indexOfItemWithRepresentedObject:(id)
public abstract NSInteger indexOfItemWithSubmenu(NSMenu submenu)
-(NSInteger)indexOfItemWithSubmenu:(NSMenu*)
public abstract NSInteger indexOfItemWithTarget_andAction(ObjCObject target, Selector actionSelector)
-(NSInteger)indexOfItemWithTarget:(id) andAction:(SEL)
public abstract NSMenuItem itemWithTitle(NSString aTitle)
-(NSMenuItem*)itemWithTitle:(NSString*)
public abstract NSMenuItem itemWithTag(NSInteger tag)
-(NSMenuItem*)itemWithTag:(NSInteger)
public abstract void setAutoenablesItems(boolean flag)
-(void)setAutoenablesItems:(BOOL)
public abstract boolean autoenablesItems()
-(BOOL)autoenablesItems
public abstract void update()
-(void)update
public abstract boolean performKeyEquivalent(NSEvent theEvent)
-(BOOL)performKeyEquivalent:(NSEvent*)
public abstract void itemChanged(NSMenuItem item)
-(void)itemChanged:(NSMenuItem*)
public abstract void performActionForItemAtIndex(NSInteger index)
-(void)performActionForItemAtIndex:(NSInteger)
public abstract void setDelegate(NSMenuDelegate anObject)
-(void)setDelegate:(id)
public abstract NSMenuDelegate delegate()
-(id)delegate
public abstract org.rococoa.cocoa.CGFloat menuBarHeight()
-(CGFloat)menuBarHeight
public abstract void cancelTracking()
-(void)cancelTracking
public abstract void cancelTrackingWithoutAnimation()
-(void)cancelTrackingWithoutAnimation
public abstract NSMenuItem highlightedItem()
-(NSMenuItem*)highlightedItem
public abstract org.rococoa.cocoa.CGFloat minimumWidth()
-(CGFloat)minimumWidth
public abstract void setMinimumWidth(org.rococoa.cocoa.CGFloat width)
-(void)setMinimumWidth:(CGFloat)
public abstract NSObject size()
-(id)size
public abstract NSFont font()
-(NSFont*)font
public abstract void setFont(NSFont font)
-(void)setFont:(NSFont*)
public abstract boolean allowsContextMenuPlugIns()
-(BOOL)allowsContextMenuPlugIns
public abstract void setAllowsContextMenuPlugIns(boolean allows)
-(void)setAllowsContextMenuPlugIns:(BOOL)
public abstract void setShowsStateColumn(boolean showsState)
-(void)setShowsStateColumn:(BOOL)
public abstract boolean showsStateColumn()
-(BOOL)showsStateColumn
public static Pointer menuZone()
+(NSZone*)menuZone
public abstract void setMenuChangedMessagesEnabled(boolean flag)
-(void)setMenuChangedMessagesEnabled:(BOOL)
public abstract boolean menuChangedMessagesEnabled()
-(BOOL)menuChangedMessagesEnabled
public abstract void helpRequested(NSEvent eventPtr)
-(void)helpRequested:(NSEvent*)
public abstract boolean isTornOff()
-(BOOL)isTornOff
public static NSMenu alloc()
public static NSMenu new_()
public static NSMenu._class_ getNSClass()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |