mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 06:51:08 +00:00
Changed includes. Defined new method
[userKeyEquivalentModifierMask]. Removed all the methods definitions from NSMenuItem. Dropped the mi prefix of the ivars. Removed ivar for backend. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10785 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ee2fe5208f
commit
ee3c4cc9c0
1 changed files with 23 additions and 87 deletions
|
@ -32,7 +32,10 @@
|
||||||
#ifndef _GNUstep_H_NSMenuItem
|
#ifndef _GNUstep_H_NSMenuItem
|
||||||
#define _GNUstep_H_NSMenuItem
|
#define _GNUstep_H_NSMenuItem
|
||||||
|
|
||||||
#include <AppKit/NSButtonCell.h>
|
#include <Foundation/NSString.h>
|
||||||
|
|
||||||
|
@class NSMenu;
|
||||||
|
@class NSImage;
|
||||||
|
|
||||||
@protocol NSMenuItem <NSCopying, NSCoding>
|
@protocol NSMenuItem <NSCopying, NSCoding>
|
||||||
|
|
||||||
|
@ -62,6 +65,7 @@
|
||||||
- (unsigned int)keyEquivalentModifierMask;
|
- (unsigned int)keyEquivalentModifierMask;
|
||||||
|
|
||||||
- (NSString*)userKeyEquivalent;
|
- (NSString*)userKeyEquivalent;
|
||||||
|
- (unsigned int)userKeyEquivalentModifierMask;
|
||||||
|
|
||||||
- (void)setMnemonicLocation:(unsigned) location;
|
- (void)setMnemonicLocation:(unsigned) location;
|
||||||
- (unsigned)mnemonicLocation;
|
- (unsigned)mnemonicLocation;
|
||||||
|
@ -98,86 +102,25 @@
|
||||||
|
|
||||||
@interface NSMenuItem : NSObject <NSMenuItem>
|
@interface NSMenuItem : NSObject <NSMenuItem>
|
||||||
{
|
{
|
||||||
NSMenu *mi_menu;
|
NSMenu *_menu;
|
||||||
NSString *mi_title;
|
NSString *_title;
|
||||||
NSString *mi_keyEquivalent;
|
NSString *_keyEquivalent;
|
||||||
unsigned int mi_keyEquivalentModifierMask;
|
unsigned int _keyEquivalentModifierMask;
|
||||||
unsigned mi_mnemonicLocation;
|
unsigned _mnemonicLocation;
|
||||||
int mi_state;
|
int _state;
|
||||||
BOOL mi_enabled;
|
BOOL _enabled;
|
||||||
NSImage *mi_image;
|
NSImage *_image;
|
||||||
NSImage *mi_onStateImage;
|
NSImage *_onStateImage;
|
||||||
NSImage *mi_offStateImage;
|
NSImage *_offStateImage;
|
||||||
NSImage *mi_mixedStateImage;
|
NSImage *_mixedStateImage;
|
||||||
id mi_target;
|
id _target;
|
||||||
SEL mi_action;
|
SEL _action;
|
||||||
int mi_tag;
|
int _tag;
|
||||||
id mi_representedObject;
|
id _representedObject;
|
||||||
NSMenu *mi_submenu;
|
NSMenu *_submenu;
|
||||||
BOOL mi_changesState;
|
BOOL _changesState;
|
||||||
|
|
||||||
// Reserved for back-end use
|
|
||||||
void *be_mi_reserved;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (void)setUsesUserKeyEquivalents:(BOOL)flag;
|
|
||||||
+ (BOOL)usesUserKeyEquivalents;
|
|
||||||
|
|
||||||
+ (id <NSMenuItem>)separatorItem;
|
|
||||||
|
|
||||||
- (id)initWithTitle:(NSString *)aString
|
|
||||||
action:(SEL)aSelector
|
|
||||||
keyEquivalent:(NSString *)charCode;
|
|
||||||
|
|
||||||
- (void)setMenu:(NSMenu *)menu;
|
|
||||||
- (NSMenu *)menu;
|
|
||||||
|
|
||||||
- (BOOL)hasSubmenu;
|
|
||||||
- (void)setSubmenu:(NSMenu *)submenu;
|
|
||||||
- (NSMenu *)submenu;
|
|
||||||
|
|
||||||
- (void)setTitle:(NSString *)aString;
|
|
||||||
- (NSString *)title;
|
|
||||||
- (BOOL)isSeparatorItem;
|
|
||||||
|
|
||||||
- (void)setKeyEquivalent:(NSString *)aKeyEquivalent;
|
|
||||||
- (NSString *)keyEquivalent;
|
|
||||||
- (void)setKeyEquivalentModifierMask:(unsigned int)mask;
|
|
||||||
- (unsigned int)keyEquivalentModifierMask;
|
|
||||||
|
|
||||||
- (NSString *)userKeyEquivalent;
|
|
||||||
|
|
||||||
- (void)setMnemonicLocation:(unsigned) location;
|
|
||||||
- (unsigned)mnemonicLocation;
|
|
||||||
- (NSString *)mnemonic;
|
|
||||||
- (void)setTitleWithMnemonic:(NSString *)stringWithAmpersand;
|
|
||||||
|
|
||||||
- (void)setImage:(NSImage *)menuImage;
|
|
||||||
- (NSImage *)image;
|
|
||||||
|
|
||||||
- (void)setState:(int)state;
|
|
||||||
- (int)state;
|
|
||||||
- (void)setOnStateImage:(NSImage *)image;
|
|
||||||
- (NSImage *)onStateImage;
|
|
||||||
- (void)setOffStateImage:(NSImage *)image;
|
|
||||||
- (NSImage *)offStateImage;
|
|
||||||
- (void)setMixedStateImage:(NSImage *)image;
|
|
||||||
- (NSImage *)mixedStateImage;
|
|
||||||
|
|
||||||
- (void)setEnabled:(BOOL)flag;
|
|
||||||
- (BOOL)isEnabled;
|
|
||||||
|
|
||||||
- (void)setTarget:(id)anObject;
|
|
||||||
- (id)target;
|
|
||||||
- (void)setAction:(SEL)aSelector;
|
|
||||||
- (SEL)action;
|
|
||||||
|
|
||||||
- (void)setTag:(int)anInt;
|
|
||||||
- (int)tag;
|
|
||||||
|
|
||||||
- (void)setRepresentedObject:(id)anObject;
|
|
||||||
- (id)representedObject;
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface NSMenuItem (GNUstepExtra)
|
@interface NSMenuItem (GNUstepExtra)
|
||||||
|
@ -187,12 +130,5 @@
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/* Private stuff; it should be in a private header file but it really doesn't
|
|
||||||
worth the effort. */
|
|
||||||
enum {
|
|
||||||
INTERCELL_SPACE = 1,
|
|
||||||
RIGHT_IMAGE_WIDTH = 12,
|
|
||||||
ADDITIONAL_WIDTH = RIGHT_IMAGE_WIDTH + 15
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // _GNUstep_H_NSMenuItem
|
#endif // _GNUstep_H_NSMenuItem
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue