mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
Add NSTableCellView class header and simple implementation
This commit is contained in:
parent
4800a950ef
commit
b895ffe953
2 changed files with 91 additions and 0 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue