00001
00002
00003
00004
00005
00006
00007
00008
00009 #import "MTKeyMapEntry.h"
00010
00011
00012 @implementation MTKeyMapEntry
00013
00014 - (id) init {
00015 self = [super init];
00016 if (self != nil) {
00017 action = 0;
00018 key = 0;
00019 modifierFlags = 0;
00020 description = nil;
00021 defaultKey = 0;
00022 defaultModifierFlags = 0;
00023 }
00024 return self;
00025 }
00026
00027 - (id) initAction:(int) newAction
00028 withKey:(char)newKey
00029 modifierFlags:(unsigned int) newModifierFlags
00030 description:(NSString*)newDescription {
00031
00032 self = [self init];
00033
00034 action = newAction;
00035 key = newKey;
00036 modifierFlags = newModifierFlags;
00037 description = newDescription;
00038 [description retain];
00039 defaultKey = newKey;
00040 defaultModifierFlags = newModifierFlags;
00041
00042 return self;
00043 }
00044
00045 - (int) action {
00046 return action;
00047 }
00048
00049 - (char) key {
00050 return key;
00051 }
00052
00053 - (unsigned int) modifierFlags {
00054 return modifierFlags;
00055 }
00056
00057 - (char) defaultKey {
00058 return defaultKey;
00059 }
00060 - (unsigned int) defaultModifierFlags {
00061 return defaultModifierFlags;
00062 }
00063
00064 - (NSString *)description {
00065 return description;
00066 }
00067
00068 - (void) setAction:(int) newAction {
00069 action = newAction;
00070 }
00071
00072 - (void) setKey:(char) newKey {
00073 key = newKey;
00074 }
00075
00076 - (void) setModifierFlags:(unsigned int) newModifierFlags{
00077 modifierFlags = newModifierFlags;
00078 }
00079
00080
00081 @end