Moved the declaration of NSMenuWindow and NSMenuWindowTitleView

into the file NSMenu.m, making this private classes.
Removed unused ivars and renamed the remaining ivars to fit the
GNUstep sheme of underscore prefixes.
Added new method [popUpContextMenu:withEvent:forView:].
Made the methods [_ownedByPopUp] and [_setOwnedByPopUp:] public.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10727 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
FredKiefer 2001-08-19 23:21:24 +00:00
parent 2b16c248ec
commit b474d85b30

View file

@ -43,43 +43,30 @@
@class NSEvent; @class NSEvent;
@class NSMatrix; @class NSMatrix;
@class NSMenuView; @class NSMenuView;
@class NSMenuWindow;
@class NSPopUpButton; @class NSPopUpButton;
@interface NSMenuWindow : NSPanel
- (void)moveToPoint:(NSPoint)aPoint;
@end
@interface NSMenu : NSObject <NSCoding, NSCopying> @interface NSMenu : NSObject <NSCoding, NSCopying>
{ {
NSString *menu_title; NSString *_title;
NSMutableArray *menu_items; NSMutableArray *_items;
NSMenuView *menu_view; NSMenuView *_view;
NSMenu *menu_supermenu; NSMenu *_superMenu;
NSMenu *menu_attachedMenu; NSMenu *_attachedMenu;
BOOL menu_changedMessagesEnabled; NSMutableArray *_notifications;
NSMutableArray *menu_notifications; BOOL _changedMessagesEnabled;
BOOL menu_autoenable; BOOL _autoenable;
BOOL menu_changed; BOOL _changed;
BOOL menu_is_tornoff; BOOL _is_tornoff;
id menu_popb;
// GNUstepExtra category // GNUstepExtra category
BOOL menu_is_beholdenToPopUpButton; BOOL _is_beholdenToPopUpButton;
BOOL menu_follow_transient; BOOL _follow_transient;
BOOL menu_is_visible; BOOL _isPartlyOffScreen;
BOOL menu_isPartlyOffScreen;
// Reserved for back-end use
void *be_menu_reserved;
@private @private
NSMenuWindow *aWindow; NSWindow *_aWindow;
NSMenuWindow *bWindow; NSWindow *_bWindow;
id titleView; id _titleView;
NSMenu *_oldAttachedMenu; NSMenu *_oldAttachedMenu;
} }
@ -157,6 +144,9 @@
/* Displaying Context-Sensitive Help */ /* Displaying Context-Sensitive Help */
- (void) helpRequested: (NSEvent*)event; - (void) helpRequested: (NSEvent*)event;
+ (void) popUpContextMenu: (NSMenu*)menu
withEvent: (NSEvent*)event
forView: (NSView*)view;
@end @end
@ -188,31 +178,17 @@
- (void)nestedCheckOffScreen; - (void)nestedCheckOffScreen;
- (void)shiftOnScreen; - (void)shiftOnScreen;
/* Popup behaviour */
- (BOOL)_ownedByPopUp;
- (void)_setOwnedByPopUp: (BOOL)flag;
@end @end
#endif #endif
/* A menu's title is an instance of this class */
@interface NSMenuWindowTitleView : NSView
{
int titleHeight;
id menu;
NSButton* button;
NSButtonCell* buttonCell;
}
- (void) _addCloseButton;
- (void) _releaseCloseButton;
- (void) windowBecomeTornOff;
- (void) setMenu: (NSMenu*)menu;
- (NSMenu*) menu;
@end
APPKIT_EXPORT NSString* const NSMenuDidSendActionNotification; APPKIT_EXPORT NSString* const NSMenuDidSendActionNotification;
APPKIT_EXPORT NSString* const NSMenuWillSendActionNotification; APPKIT_EXPORT NSString* const NSMenuWillSendActionNotification;
APPKIT_EXPORT NSString* const NSMenuDidAddItemNotification; APPKIT_EXPORT NSString* const NSMenuDidAddItemNotification;
APPKIT_EXPORT NSString* const NSMenuDidRemoveItemNotification; APPKIT_EXPORT NSString* const NSMenuDidRemoveItemNotification;
APPKIT_EXPORT NSString* const NSMenuDidChangeItemNotification; APPKIT_EXPORT NSString* const NSMenuDidChangeItemNotification;
#endif // _GNUstep_H_NSMenu #endif // _GNUstep_H_NSMenu