mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
Initial skeletal implementation of NSDictionaryController
This commit is contained in:
parent
abb10cb670
commit
7fa1ce78bb
2 changed files with 162 additions and 1 deletions
|
@ -33,8 +33,59 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
@class NSDictionaryControllerKeyValuePair;
|
||||
|
||||
@interface NSDictionaryController : NSArrayController
|
||||
{
|
||||
NSDictionary *_localizedKeyDictionary;
|
||||
NSString *_localizedKeyTable;
|
||||
NSArray *_includedKeys;
|
||||
NSArray *_excludedKeys;
|
||||
NSString *_initialKey;
|
||||
id _initialValue;
|
||||
}
|
||||
|
||||
- (NSDictionaryControllerKeyValuePair *) newObject;
|
||||
|
||||
- (NSDictionary *) localizedKeyDictionary;
|
||||
- (void) setLocalizedKeyDictionary: (NSDictionary *)dict;
|
||||
|
||||
- (NSString *) localizedKeyTable;
|
||||
- (void) setLocalizedKeyTable: (NSString *)table;
|
||||
|
||||
- (NSArray *) includedKeys;
|
||||
- (void) setIncludedKeys: (NSArray *)includedKeys;
|
||||
|
||||
- (NSArray *) excludedKeys;
|
||||
- (void) setExcludedKeys: (NSArray *)excludedKeys;
|
||||
|
||||
- (NSString *) initialKey;
|
||||
- (void) setInitialKey: (NSString *)k;
|
||||
|
||||
- (id) initialValue;
|
||||
- (void) setInitialValue: (id)v;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSDictionaryControllerKeyValuePair : NSObject
|
||||
{
|
||||
BOOL _explicitlyIncluded;
|
||||
NSString *_key;
|
||||
NSString *_localizedKey;
|
||||
id _value;
|
||||
}
|
||||
|
||||
- (BOOL) isExplicitlyIncluded;
|
||||
|
||||
- (NSString *) key;
|
||||
- (void) setKey: (NSString *)key;
|
||||
|
||||
- (NSString *) localizedKey;
|
||||
- (void) setLocalizedKey: (NSString *)key;
|
||||
|
||||
- (id) value;
|
||||
- (void) setValue: (id)value;
|
||||
|
||||
@end
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
|
|
@ -23,8 +23,118 @@
|
|||
*/
|
||||
|
||||
#import "AppKit/NSDictionaryController.h"
|
||||
|
||||
|
||||
@implementation NSDictionaryController
|
||||
|
||||
- (NSDictionaryControllerKeyValuePair *) newObject
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSDictionary *) localizedKeyDictionary
|
||||
{
|
||||
return _localizedKeyDictionary;
|
||||
}
|
||||
|
||||
- (void) setLocalizedKeyDictionary: (NSDictionary *)dict
|
||||
{
|
||||
ASSIGNCOPY(_localizedKeyDictionary, dict);
|
||||
}
|
||||
|
||||
- (NSString *) localizedKeyTable
|
||||
{
|
||||
return _localizedKeyTable;
|
||||
}
|
||||
|
||||
- (void) setLocalizedKeyTable: (NSString *)table
|
||||
{
|
||||
ASSIGNCOPY(_localizedKeyTable, table);
|
||||
}
|
||||
|
||||
|
||||
- (NSArray *) includedKeys
|
||||
{
|
||||
return _includedKeys;
|
||||
}
|
||||
|
||||
- (void) setIncludedKeys: (NSArray *)includedKeys
|
||||
{
|
||||
ASSIGNCOPY(_includedKeys, includedKeys);
|
||||
}
|
||||
|
||||
|
||||
- (NSArray *) excludedKeys
|
||||
{
|
||||
return _excludedKeys;
|
||||
}
|
||||
|
||||
- (void) setExcludedKeys: (NSArray *)excludedKeys
|
||||
{
|
||||
ASSIGNCOPY(_excludedKeys, excludedKeys);
|
||||
}
|
||||
|
||||
|
||||
- (NSString *) initialKey
|
||||
{
|
||||
return _initialKey;
|
||||
}
|
||||
|
||||
- (void) setInitialKey: (NSString *)k
|
||||
{
|
||||
ASSIGNCOPY(_initialKey, k);
|
||||
}
|
||||
|
||||
|
||||
- (id) initialValue
|
||||
{
|
||||
return _initialValue;
|
||||
}
|
||||
|
||||
- (void) setInitialValue: (id)v
|
||||
{
|
||||
ASSIGNCOPY(_initialValue, v);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation NSDictionaryControllerKeyValuePair
|
||||
|
||||
- (BOOL) isExplicitlyIncluded
|
||||
{
|
||||
return _explicitlyIncluded;
|
||||
}
|
||||
|
||||
|
||||
- (NSString *) key
|
||||
{
|
||||
return _key;
|
||||
}
|
||||
|
||||
- (void) setKey: (NSString *)key
|
||||
{
|
||||
ASSIGNCOPY(_key, key);
|
||||
}
|
||||
|
||||
|
||||
- (NSString *) localizedKey
|
||||
{
|
||||
return _localizedKey;
|
||||
}
|
||||
|
||||
- (void) setLocalizedKey: (NSString *)key
|
||||
{
|
||||
ASSIGNCOPY(_localizedKey, key);
|
||||
}
|
||||
|
||||
- (id) value
|
||||
{
|
||||
return _value;
|
||||
}
|
||||
|
||||
- (void) setValue: (id)value
|
||||
{
|
||||
ASSIGNCOPY(_value, value);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
|
Loading…
Reference in a new issue