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


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



@class MPFunctionsViewController, MPFunctionsCollectionView;


/*!
    @class      MPFunctionsViewController
    @abstract   Controls a view from which the user can select function to be
                inserted into a <code>@link
                //apple_ref/occ/cl/MPExpressionView@/link</code>.
 
    @discussion The view contain a <code>NSCollectionView</code> displaying the
                prototypes an a <code>NSTextField</code> displaying a description
                of the currently selected prototype.
 */
@interface MPFunctionsViewController : NSViewController

/*!
    @property   collectionView
    @abstract   The <code>NSCollectionView</code> that displays the function
                prototypes.
 */
@property (weak) IBOutlet NSCollectionView *collectionView;


/*!
    @property   functionPrototypes
    @abstract   Contains the <code>@link
                //apple_ref/occ/cl/MPFunction@/link</code> objects that get
                inserted into an expression if selected.
 
    @discussion Every object in the array must be an <code>@link
                //apple_ref/occ/cl/MPFunction@/link</code> instance.
 */
@property (nonatomic, strong) NSArray *functionPrototypes;


/*!
    @property   currentDescription
    @abstract   The string that describes the function prototype that is
                currently selected.
 
    @discussion If this string is empty a placeholder value will be displayed.
 */
@property (nonatomic, strong) NSString *currentDescription;


/*!
    @property   target
    @abstract   The target object to receive action messages from the receiver.
 */
@property (nonatomic, weak) id target;


/*!
    @property   action
    @abstract   The receiver's action method to the specified selector.
 
    @discussion The action method is invoked when the user selects one of the 
                function prototypes in the collection view. The prototype that
                was selected is passed as the one and only argument to
                the specified selector.
 */
@property (nonatomic) SEL action;

@end
