Delegate to cell

This commit is contained in:
Gregory John Casamento 2020-04-27 05:34:02 -04:00
parent 5811355c00
commit 60e395f4d1
2 changed files with 15 additions and 22 deletions

View file

@ -42,16 +42,9 @@ extern "C" {
@interface NSPathControl : NSControl @interface NSPathControl : NSControl
{ {
NSPathStyle _pathStyle;
NSColor *_backgroundColor; NSColor *_backgroundColor;
NSArray *_pathItems; NSArray *_pathItems;
NSString *_placeholderString;
NSAttributedString *_placeholderAttributedString;
NSArray *_allowedTypes;
id<NSPathControlDelegate> _delegate; id<NSPathControlDelegate> _delegate;
NSURL *_url;
SEL _doubleAction;
NSArray *_pathComponentCells;
} }
- (void) setPathStyle: (NSPathStyle)style; - (void) setPathStyle: (NSPathStyle)style;

View file

@ -38,47 +38,47 @@
- (void) setPathStyle: (NSPathStyle)style - (void) setPathStyle: (NSPathStyle)style
{ {
_pathStyle = style; [_cell setPathStyle: style];
} }
- (NSPathStyle) pathStyle - (NSPathStyle) pathStyle
{ {
return _pathStyle; return [_cell pathStyle];
} }
- (NSPathComponentCell *) clickedPathComponentCell - (NSPathComponentCell *) clickedPathComponentCell
{ {
return nil; return [_cell clickedPathComponentCell];
} }
- (NSArray *) pathComponentCells - (NSArray *) pathComponentCells
{ {
return _pathComponentCells; return [_cell pathComponentCells];
} }
- (void) setPathComponentCells: (NSArray *)cells - (void) setPathComponentCells: (NSArray *)cells
{ {
ASSIGN(_pathComponentCells, cells); [_cell setPathComponentCells: cells];
} }
- (SEL) doubleAction; - (SEL) doubleAction;
{ {
return _doubleAction; return [_cell doubleAction];
} }
- (void) setDoubleAction: (SEL)doubleAction - (void) setDoubleAction: (SEL)doubleAction
{ {
_doubleAction = doubleAction; [_cell setDoubleAction: doubleAction];
} }
- (NSURL *) URL - (NSURL *) URL
{ {
return _url; return [_cell URL];
} }
- (void) setURL: (NSURL *)url - (void) setURL: (NSURL *)url
{ {
ASSIGNCOPY(_url, url); [_cell setURL: url];
} }
- (id<NSPathControlDelegate>) delegate - (id<NSPathControlDelegate>) delegate
@ -108,12 +108,12 @@
- (NSArray *) allowedTypes; - (NSArray *) allowedTypes;
{ {
return _allowedTypes; return [_cell allowedTypes];
} }
- (void) setAllowedTypes: (NSArray *)allowedTypes - (void) setAllowedTypes: (NSArray *)allowedTypes
{ {
ASSIGNCOPY(_allowedTypes, allowedTypes); [_cell setAllowedTypes: allowedTypes];
} }
- (NSPathControlItem *) clickedPathItem - (NSPathControlItem *) clickedPathItem
@ -133,22 +133,22 @@
- (NSAttributedString *) placeholderAttributedString - (NSAttributedString *) placeholderAttributedString
{ {
return _placeholderAttributedString; return [_cell placeholderAttributedString];
} }
- (void) setPlaceholderAttributedString: (NSAttributedString *)string - (void) setPlaceholderAttributedString: (NSAttributedString *)string
{ {
ASSIGNCOPY(_placeholderAttributedString, string); [_cell setPlaceholderAttributedString: string];
} }
- (NSString *) placeholderString - (NSString *) placeholderString
{ {
return _placeholderString; return [_cell placeholderString];
} }
- (void) setPlaceholderString: (NSString *)string - (void) setPlaceholderString: (NSString *)string
{ {
ASSIGNCOPY(_placeholderString, string); [_cell setPlaceholderString: string];
} }
@end @end