Add NSPathControlItem

This commit is contained in:
Gregory John Casamento 2020-04-27 03:25:19 -04:00
parent 3dc3feda41
commit 5811355c00
3 changed files with 63 additions and 0 deletions

View file

@ -33,9 +33,27 @@
extern "C" {
#endif
@class NSURL, NSAttributedString, NSImage, NSString;
@interface NSPathControlItem : NSObject
{
NSURL *_url;
NSAttributedString *_attributedTitle;
NSImage *_image;
NSString *_title;
}
- (NSURL *) URL;
- (void) setURL: (NSURL *)url;
- (NSAttributedString *) attributedTitle;
- (void) setAttributedTitle: (NSAttributedString *)attributedTitle;
- (NSImage *) image;
- (void) setImage: (NSImage *)image;
- (NSString *) title;
- (void) setTitle: (NSString *)title;
@end

View file

@ -23,6 +23,7 @@
*/
#import <Foundation/NSURL.h>
#import "AppKit/NSPathComponentCell.h"
#import "AppKit/NSImage.h"

View file

@ -22,9 +22,53 @@
Boston, MA 02110 USA.
*/
#import <Foundation/NSString.h>
#import <Foundation/NSURL.h>
#import "AppKit/NSPathControlItem.h"
#import "AppKit/NSImage.h"
#import "AppKit/NSAttributedString.h"
@implementation NSPathControlItem
- (NSAttributedString *) attributedTitle
{
return _attributedTitle;
}
- (void) setAttributedTitle: (NSAttributedString *)attributedTitle
{
ASSIGNCOPY(_attributedTitle, attributedTitle);
}
- (NSImage *) image
{
return _image;
}
- (void) setImage: (NSImage *)image
{
ASSIGNCOPY(_image, image);
}
- (NSURL *) URL
{
return _url;
}
- (void) setURL: (NSURL *)url
{
ASSIGNCOPY(_url, url);
}
- (NSString *) title
{
return _title;
}
- (void) setTitle: (NSString *)title
{
ASSIGNCOPY(_title, title);
}
@end