Add NSTableCellView class header and simple implementation

This commit is contained in:
Gregory John Casamento 2022-12-12 11:14:02 -05:00
parent 4800a950ef
commit b895ffe953
2 changed files with 91 additions and 0 deletions

View file

@ -26,7 +26,9 @@
#define _NSTableCellView_h_GNUSTEP_GUI_INCLUDE
#import <AppKit/NSView.h>
#import <AppKit/NSCell.h>
#import <AppKit/AppKitDefines.h>
#import <AppKit/NSTableView.h>
#if OS_API_VERSION(MAC_OS_X_VERSION_10_7, GS_API_LATEST)
@ -34,9 +36,36 @@
extern "C" {
#endif
@class NSImageView, NSTextField, NSArray;
APPKIT_EXPORT_CLASS
@interface NSTableCellView : NSView
{
id _objectValue;
NSImageView *_imageView;
NSTextField *_textField;
NSBackgroundStyle _backgroundStyle;
NSTableViewRowSizeStyle _rowSizeStyle;
NSArray *_draggingImageComponents;
}
- (id) objectValue;
- (void) setObjectValue: (id)objectValue;
- (NSImageView *) imageView;
- (void) setImageView: (NSImageView *)imageView;
- (NSTextField *) textField;
- (void) setTextField: (NSTextField *)textField;
- (NSBackgroundStyle) backgroundStyle;
- (void) setBackgroundStyle: (NSBackgroundStyle)backgroundStyle;
- (NSTableViewRowSizeStyle) rowSizeStyle;
- (void) setRowSizeStyle: (NSTableViewRowSizeStyle) rowSizeStyle;
- (NSArray *) draggingImageComponents;
- (void) setDraggingImageComponents: (NSArray *)draggingImageComponents;
@end
#if defined(__cplusplus)

View file

@ -23,8 +23,70 @@
*/
#import "AppKit/NSTableCellView.h"
#import "AppKit/NSImageView.h"
#import "AppKit/NSTextField.h"
@implementation NSTableCellView
- (id) objectValue
{
return _objectValue;
}
- (void) setObjectValue: (id)objectValue
{
ASSIGN(_objectValue, objectValue);
}
- (NSImageView *) imageView
{
return _imageView;
}
- (void) setImageView: (NSImageView *)imageView
{
ASSIGN(_imageView, imageView);
}
- (NSTextField *) textField
{
return _textField;
}
- (void) setTextField: (NSTextField *)textField
{
ASSIGN(_textField, textField);
}
- (NSBackgroundStyle) backgroundStyle
{
return _backgroundStyle;
}
- (void) setBackgroundStyle: (NSBackgroundStyle)backgroundStyle
{
_backgroundStyle = backgroundStyle;
}
- (NSTableViewRowSizeStyle) rowSizeStyle
{
return _rowSizeStyle;
}
- (void) setRowSizeStyle: (NSTableViewRowSizeStyle) rowSizeStyle
{
_rowSizeStyle = rowSizeStyle;
}
- (NSArray *) draggingImageComponents
{
return _draggingImageComponents;
}
- (void) setDraggingImageComponents: (NSArray *)draggingImageComponents
{
ASSIGNCOPY(_draggingImageComponents, draggingImageComponents);
}
@end