Archived
1

Added MPExpressionView Delegate Prototype (not in use yet)

This commit is contained in:
Kim Wittenburg
2014-12-17 22:06:16 +01:00
parent 5aef06febe
commit 152b981e24

View File

@@ -10,10 +10,11 @@
@class MPExpressionView, MPExpressionStorage, MPRangePath; @class MPExpressionView, MPExpressionStorage, MPFunction, MPRangePath;
//@protocol MPExpressionViewDelegate;
@interface MPExpressionView : NSView @interface MPExpressionView : NSView <NSUserInterfaceValidations>
#pragma mark Creation Methods #pragma mark Creation Methods
@@ -23,6 +24,8 @@
@property (readonly, nonatomic, strong) MPExpressionStorage *expressionStorage; @property (readonly, nonatomic, strong) MPExpressionStorage *expressionStorage;
//@property (nonatomic, weak) id<MPExpressionViewDelegate> delegate;
@property (nonatomic, strong) MPRangePath *selection; @property (nonatomic, strong) MPRangePath *selection;
@property (nonatomic, strong) NSError *mathError; @property (nonatomic, strong) NSError *mathError;
@@ -31,8 +34,40 @@
@property (nonatomic, weak) id target; @property (nonatomic, weak) id target;
@property (nonatomic) SEL action; @property (nonatomic) SEL action;
//@property (nonatomic) BOOL editable;
//@property (nonatomic) BOOL selectable;
#pragma mark Actions #pragma mark Actions
// Radians - Degrees
- (IBAction)switchToRadians:(id)sender;
- (IBAction)switchToDegrees:(id)sender;
- (IBAction)switchRadiansDegrees:(id)sender; - (IBAction)switchRadiansDegrees:(id)sender;
- (IBAction)showFunctions:(id)sender; // Functions
- (IBAction)toggleFunctionsPopover:(id)sender;
@end @end
//@protocol MPExpressionViewDelegate <NSObject>
//@optional
//
//#pragma mark Editing
//- (MPRangePath *)expressionView:(MPExpressionView *)expressionView willChangeSelectionFromRangePath:(MPRangePath *)oldSelection toRangePath:(MPRangePath *)newSelection;
//- (void)expressionView:(MPExpressionView *)expressionView didChangeSelectionFromRangePath:(MPRangePath *)oldSelection toRangePath:(MPRangePath *)newSelection;
//
//- (BOOL)expressionView:(MPExpressionView *)expressionView shouldChangeSymbolsInRangePath:(MPRangePath *)rangePath replacementElements:(NSArray *)replacement;
//- (BOOL)expressionView:(MPExpressionView *)expressionView shouldInsertFunction:(MPFunction *)function replacingRangePath:(MPRangePath *)currentSelection;
//- (void)expressionViewDidChange:(MPExpressionView *)expressionView;
//
//- (BOOL)expressionViewShouldBeginEditing:(MPExpressionView *)expressionView;
//- (BOOL)expressionViewShouldEndEditing:(MPExpressionView *)expressionView;
//- (void)expressionViewDidBeginEditing:(MPExpressionView *)expressionView;
//- (void)expressionDidEndEditing:(MPExpressionView *)expressionView;
//
//// TODO: Errors...
//#pragma mark Evaluation
//
//- (BOOL)expressionViewShouldEvaluate:(MPExpressionView *)expressionView;
//- (void)expressionViewDidEvaluate:(MPExpressionView *)expressionView;
//
//@end