Initial skeleton for NSTableCellView

This commit is contained in:
Gregory John Casamento 2022-09-03 10:45:48 -04:00
parent 968e78ab34
commit edb517ceca
3 changed files with 83 additions and 1 deletions

View file

@ -25,7 +25,11 @@
#ifndef _NSTableCellView_h_GNUSTEP_GUI_INCLUDE
#define _NSTableCellView_h_GNUSTEP_GUI_INCLUDE
#import <AppKit/NSView.h>
#import <AppKit/NSTableView.h>
#import <AppKit/NSCell.h>
@class NSImageView;
@class NSTextField;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_0, GS_API_LATEST)
@ -34,7 +38,30 @@ extern "C" {
#endif
@interface NSTableCellView : NSView
{
id _objectValue;
IBOutlet NSImageView *_imageView;
IBOutlet NSTextField *_textField;
NSBackgroundStyle _backgroundStyle;
NSTableViewRowSizeStyle _rowSizeStyle;
NSArray *_draggingImageComponents;
}
- (void) setImageView: (NSImageView *)imageView;
- (NSImageView *) imageView;
- (void) setTextField: (NSTextField *)textField;
- (NSTextField *) textField;
- (void) setBackgroundStyle: (NSBackgroundStyle)style;
- (NSBackgroundStyle) backgroundStyle;
- (void) setRowSizeStyle: (NSTableViewRowSizeStyle)style;
- (NSTableViewRowSizeStyle) rowSizeStyle;
- (NSArray *) draggingImageComponents;
@end
#if defined(__cplusplus)

View file

@ -88,6 +88,15 @@ typedef enum _NSTableViewAnimationOptions
NSTableViewAnimationSlideLeft = 0x30,
NSTableViewAnimationSlideRight = 0x40,
} NSTableViewAnimationOptions;
typedef enum _NSTableViewRowSizeStyle
{
NSTableViewRowSizeStyleDefault = -1,
NSTableViewRowSizeStyleCustom = 0,
NSTableViewRowSizeStyleSmall = 1,
NSTableViewRowSizeStyleMedium = 2,
NSTableViewRowSizeStyleLarge = 3,
} NSTableViewRowSizeStyle;
#endif

View file

@ -26,5 +26,51 @@
@implementation NSTableCellView
- (void) setImageView: (NSImageView *)imageView
{
ASSIGN(_imageView, imageView);
}
- (NSImageView *) imageView
{
return _imageView;
}
- (void) setTextField: (NSTextField *)textField
{
ASSIGN(_textField, textField);
}
- (NSTextField *) textField
{
return _textField;
}
- (void) setBackgroundStyle: (NSBackgroundStyle)style
{
_backgroundStyle = style;
}
- (NSBackgroundStyle) backgroundStyle
{
return _backgroundStyle;
}
- (void) setRowSizeStyle: (NSTableViewRowSizeStyle)style
{
_rowSizeStyle = style;
}
- (NSTableViewRowSizeStyle) rowSizeStyle
{
return _rowSizeStyle;
}
- (NSArray *) draggingImageComponents
{
return _draggingImageComponents;
}
@end