//
//  MPExpressionLayout.h
//  MathKit
//
//  Created by Kim Wittenburg on 07.08.14.
//  Copyright (c) 2014 Kim Wittenburg. All rights reserved.
//

#import "MPLayout.h"


/*!
 @header
 This file contains the <code>MPExpressionLayout</code> class.
 */



@class MPExpressionLayout, MPExpression, MPFunctionLayout;


/*!
    @class      MPExpressionLayout
    @abstract   An expression layout draws an <code>@link
                //apple_ref/occ/cl/MPExpression@/link</code>.
 
    @discussion For more information on the layout system see the documentation
                on the <code>@link //apple_ref/occ/cl/MPLayout@/link</code>
                class.
 */
@interface MPExpressionLayout : MPLayout

/*!
    @method     initWithExpression:parent:
    @abstract   Initializes an expression layout with the specified expression
                and parent layout.
 
    @discussion To initialize a layout for the root expression of an expression
                tree specify <code>nil</code> as the <code>parent</code>.
 
    @param      expression
                The expression that sould be represented by the receiver. Must
                not be <code>ni</code>.
 
    @param      parent
                The parent layout of the receiver. Specify <code>nil</code> to
                initalize a root expression layout.
 
    @return     A newly initialized expression layout.
 */
- (instancetype)initWithExpression:(MPExpression *)expression
                            parent:(MPFunctionLayout *)parent;


/*!
    @property   expression
    @abstract   The expression represented by the receiver.
 */
@property (readonly, nonatomic, weak) MPExpression *expression;

@end
