libs-gui/Headers/AppKit/NSDictionaryController.h

152 lines
3.6 KiB
C
Raw Normal View History

/* Definition of class NSDictionaryController
Copyright (C) 2021 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: 16-10-2021
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#ifndef _NSDictionaryController_h_GNUSTEP_GUI_INCLUDE
#define _NSDictionaryController_h_GNUSTEP_GUI_INCLUDE
#import <AppKit/NSArrayController.h>
2021-10-16 17:14:14 +00:00
#if OS_API_VERSION(MAC_OS_X_VERSION_10_11, GS_API_LATEST)
2023-02-28 05:40:40 +00:00
APPKIT_EXPORT_CLASS
2021-10-16 17:14:14 +00:00
@interface NSDictionaryControllerKeyValuePair : NSObject
{
NSString *_key;
id _value;
NSString *_localizedKey;
BOOL _explicitlyIncluded;
}
2021-10-16 17:14:14 +00:00
- (instancetype) init;
/**
* Returns a copy of the key
*/
- (NSString *) key;
- (void) setKey: (NSString *)key;
/**
* Returns a strong reference to the value
*/
- (id) value;
- (void) setValue: (id)value;
/**
* Localized key copy
*/
- (NSString *) localizedKey;
- (void) setLocalizedKey: (NSString *)localizedKey;
/**
* Is this key value pair included in the underlying dictionary.
*/
- (BOOL) isExplicitlyIncluded;
- (void) setExplicitlyIncluded: (BOOL)flag;
2021-10-16 17:14:14 +00:00
@end
2021-10-16 17:14:14 +00:00
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
#if defined(__cplusplus)
extern "C" {
#endif
2023-02-28 05:40:40 +00:00
APPKIT_EXPORT_CLASS
@interface NSDictionaryController : NSArrayController
{
2023-02-28 05:40:40 +00:00
NSDictionary *_contentDictionary;
NSString *_initialKey;
id _initialValue;
NSArray *_includedKeys;
NSArray *_excludedKeys;
NSDictionary *_localizedKeyDictionary;
NSString *_localizedKeyTable;
NSUInteger _count;
}
2021-10-16 17:14:14 +00:00
/**
* Returns a new object conforming to the NSDictionaryControllerKeyValuePair
* informal protocol. Overriden from superclass.
*/
- (NSDictionaryControllerKeyValuePair *) newObject;
/**
* Returns a copy of the initialKey.
*/
- (NSString *) initialKey;
- (void) setInitialKey: (NSString *)initialKey;
/**
* Returns a strong reference to the initialValue.
*/
- (id) initialValue;
- (void) setInitialValue: (id)value;
/**
* Returns a copy of the included keys. Included keys are always represented by a
* key value pair whether or not they are included in the underlying dictionary.
*/
- (NSArray *) includedKeys;
- (void) setIncludedKeys: (NSArray *)includedKeys;
/**
* Returns a copy of the included keys. Included keys are always represented by a
* key value pair whether or not they are included in the underlying dictionary.
*/
- (NSArray *) excludedKeys;
- (void) setExcludedKeys: (NSArray *)excludedKeys;
2021-10-19 17:07:22 +00:00
/**
* Returns a copy of the localized key dictionary.
*/
2021-10-16 17:14:14 +00:00
- (NSDictionary *) localizedKeyDictionary;
2023-02-28 05:40:40 +00:00
/**
* Sets the localized key dictionary.
*/
2021-10-16 17:14:14 +00:00
- (void) setLocalizedKeyDictionary: (NSDictionary *)dict;
2023-02-28 05:40:40 +00:00
/**
* Returns the keyTable which is the dictionary in strings format.
*/
2021-10-16 17:14:14 +00:00
- (NSString *) localizedKeyTable;
2023-02-28 05:40:40 +00:00
/**
* Sets the localized keyTable in strings format.
*/
2021-10-16 17:14:14 +00:00
- (void) setLocalizedKeyTable: (NSString *)keyTable;
@end
#if defined(__cplusplus)
}
#endif
#endif /* GS_API_MACOSX */
#endif /* _NSDictionaryController_h_GNUSTEP_GUI_INCLUDE */