Archived
1
This repository has been archived on 2022-08-08. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
mathpad/MathPad/MPLayout.h
2014-08-22 00:54:13 +02:00

48 lines
1.2 KiB
Objective-C

//
// MPDrawable.h
// MathPad
//
// Created by Kim Wittenburg on 07.08.14.
// Copyright (c) 2014 Kim Wittenburg. All rights reserved.
//
@import Cocoa;
#import "MPExpressionStorage.h"
#define MPNull [NSNull null]
@interface MPLayout : NSObject
#pragma mark Creation Methods
- (instancetype)init;
- (instancetype)initWithPath:(NSIndexPath *)path
parent:(MPLayout *)parent;
#pragma mark Text System Objects
@property (readonly, nonatomic, weak) MPExpressionStorage *expressionStorage;
#pragma mark Cache Tree
@property (readonly, nonatomic, weak) MPLayout *parent;
#pragma mark Cache Methods
// Querying Caches
- (id)cachableObjectForIndex:(NSUInteger)index
generator:(id(^)())generator;
// Clearing Caches
- (void)clearCacheInRange:(NSRange)range
replacementLength:(NSUInteger)replacementLength;
- (void)invalidate;
#pragma mark Calculation and Drawing Methods
// TODO: Implement Small Size
// @property (nonatomic) BOOL usesSmallSize;
- (NSSize)size;
- (void)drawAtPoint:(NSPoint)point;
@end
@interface MPLayout (MPSubclassImplement)
- (MPLayout *)childLayoutAtIndex:(NSUInteger)index; // To be implemented
- (NSSize)generateSize; // To be implemented
@end