mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
Skeleton out scrubber layout
This commit is contained in:
parent
f54f50600b
commit
63baff0b6a
2 changed files with 154 additions and 3 deletions
|
@ -25,7 +25,9 @@
|
|||
#ifndef _NSScrubberLayout_h_GNUSTEP_GUI_INCLUDE
|
||||
#define _NSScrubberLayout_h_GNUSTEP_GUI_INCLUDE
|
||||
|
||||
#import "Foundation/NSObject.h"
|
||||
#import <Foundation/NSObject.h>
|
||||
#import <Foundation/NSCoder.h>
|
||||
#import <Foundation/NSGeometry.h>
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_12, GS_API_LATEST)
|
||||
|
||||
|
@ -33,10 +35,54 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
@interface NSScrubberLayout : NSObject
|
||||
@class NSScrubber;
|
||||
|
||||
@interface NSScrubberLayoutAttributes : NSObject <NSCopying>
|
||||
|
||||
+ (NSScrubberLayoutAttributes *) layoutAttributesForItemAtIndex: (NSInteger)index;
|
||||
|
||||
- (CGFloat) alpha;
|
||||
|
||||
- (NSRect) frame;
|
||||
|
||||
- (NSInteger) itemIndex;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSScrubberLayout : NSObject <NSCoding>
|
||||
|
||||
// Configuring
|
||||
- (Class) layoutAttributesClass;
|
||||
|
||||
- (NSScrubber *) scrubber;
|
||||
|
||||
- (NSRect) visibleRect;
|
||||
|
||||
- (void) invalidateLayout;
|
||||
|
||||
// Subclassing layout
|
||||
- (void) prepareLayout;
|
||||
|
||||
- (NSSize) scrubberContentSize;
|
||||
|
||||
- (NSScrubberLayoutAttributes *) layoutAttributesForItemAtIndex: (NSInteger)index;
|
||||
|
||||
- (NSScrubberLayoutAttributes *) layoutAttributesForItemsInRect: (NSRect)rect;
|
||||
|
||||
- (BOOL) shouldInvalidateLayoutForHighlightChange;
|
||||
|
||||
- (BOOL) shouldInvalidateLayoutForSelectionChange;
|
||||
|
||||
- (BOOL) shouldInvalidateLayoutForChangeFromVisibleRect: (NSRect)fromRect
|
||||
toVisibleRect: (NSRect)toRect;
|
||||
|
||||
- (BOOL) automaticallyMirrorsInRightToLeftLayout;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -24,7 +24,112 @@
|
|||
|
||||
#import "AppKit/NSScrubberLayout.h"
|
||||
|
||||
@implementation NSScrubberLayout
|
||||
@implementation NSScrubberLayoutAttributes
|
||||
|
||||
+ (NSScrubberLayoutAttributes *) layoutAttributesForItemAtIndex: (NSInteger)index
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (CGFloat) alpha
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
- (NSRect) frame
|
||||
{
|
||||
return NSZeroRect;
|
||||
}
|
||||
|
||||
- (NSInteger) itemIndex
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (instancetype) copyWithZone: (NSZone *)z
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation NSScrubberLayout
|
||||
// Configuring
|
||||
- (Class) layoutAttributesClass
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSScrubber *) scrubber
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSRect) visibleRect
|
||||
{
|
||||
return NSZeroRect;
|
||||
}
|
||||
|
||||
- (void) invalidateLayout
|
||||
{
|
||||
}
|
||||
|
||||
// Subclassing layout
|
||||
- (void) prepareLayout
|
||||
{
|
||||
}
|
||||
|
||||
- (NSSize) scrubberContentSize
|
||||
{
|
||||
return NSZeroSize;
|
||||
}
|
||||
|
||||
- (NSScrubberLayoutAttributes *) layoutAttributesForItemAtIndex: (NSInteger)index
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSScrubberLayoutAttributes *) layoutAttributesForItemsInRect: (NSRect)rect
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (BOOL) shouldInvalidateLayoutForHighlightChange
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL) shouldInvalidateLayoutForSelectionChange
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL) shouldInvalidateLayoutForChangeFromVisibleRect: (NSRect)fromRect
|
||||
toVisibleRect: (NSRect)toRect
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL) automaticallyMirrorsInRightToLeftLayout
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (instancetype) init
|
||||
{
|
||||
self = [super init];
|
||||
return self;
|
||||
}
|
||||
|
||||
- (instancetype) initWithCoder: (NSCoder *)coder
|
||||
{
|
||||
self = [super init];
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) encodeWithCoder: (NSCoder *)coder
|
||||
{
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
|
Loading…
Reference in a new issue