mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
Initial skeleton for NSTableCellView
This commit is contained in:
parent
968e78ab34
commit
edb517ceca
3 changed files with 83 additions and 1 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue