Archived
1

Improved Model

Added Keyboard Selection Support
Added Mouse Selection Support
Added Keyboard Editing Support
Corrected Some Bugs
Abstracted the Layout System further
Added Functions Button (test)
This commit is contained in:
Kim Wittenburg
2014-08-31 15:41:17 +02:00
parent 9aa4bca234
commit 4a3ea0cede
23 changed files with 885 additions and 262 deletions

View File

@@ -216,6 +216,32 @@
- (NSUInteger)indexOfElement:(id<MPExpressionElement>)element;
/*!
@method indexOfElementAtSymbolLocation:offset
@brief Calculates the index of the element the specified location points
to.
@discussion The @c location is in the length reference frame whereas the
returned value is an element index. This method converts from
the former to the latter.
If the location exceeds the receiver's bounds a @c
NSRangeException will be raised.
@param location
The location of which you want the corresponding element index.
@param offset
An output parameter that gets set to the offst into the symbol
whose index is returned. If location for example points to the
symbol @c '2' in the string element @c '123' the offset @c would
be set to @c 1.
@return The index of the element the location points to.
*/
- (NSUInteger)indexOfElementAtSymbolLocation:(NSUInteger)location offset:(out NSUInteger *)offset;
/*!
@method replaceSymbolsInRange:withElements:
@brief Replaces the elements in the given range with the contents of the
@@ -242,7 +268,6 @@
*/
- (void)replaceSymbolsInRange:(NSRange)range
withElements:(NSArray *)elements;
// TODO: - (NSUInteger)indexOfElementAtSymbolLocation:(NSUInteger)location;
#warning Evaluating must possibly return error
- (double)doubleValue; // Evaluates Expression
@@ -304,6 +329,18 @@
#pragma mark Working With the Expression Tree
/*!
@method rootExpression
@brief Returns the root expression from the receiver's expression tree.
@discussion The root expression is the ultimate parent of all expressions and
functions in the expression tree.
@return The root expression from the receiver's expression tree.
*/
- (MPExpression *)rootExpression;
/*!
@method elementAtIndexPath:
@brief Returns the element at the specified index path.
@@ -511,6 +548,19 @@
*/
- (NSArray *)elements;
// TODO: - (NSMutableArray *)mutableElements;
/*!
@method mutableElements
@brief Returns a proxy mutable array object that responds to all methods
defined by @c NSMutableArray.
@discussion Mutations on the proxy object also change the receiver. The proxy
object does not respond to coding methods. Copying the proxy
object will not duplicate it.
@return A proxy object that responds to all methods defined by @c
NSMutableArray.
*/
// - (NSMutableArray *)mutableElements;
@end