//
// MPFunctionsViewController.h
// MathKit
//
// Created by Kim Wittenburg on 28.09.14.
// Copyright (c) 2014 Kim Wittenburg. All rights reserved.
//
/*!
@header
This file contains the MPFunctionsViewController class.
*/
@class MPFunctionsViewController, MPFunctionsCollectionView;
/*!
@class MPFunctionsViewController
@abstract Controls a view from which the user can select function to be
inserted into a @link
//apple_ref/occ/cl/MPExpressionView@/link.
@discussion The view contain a NSCollectionView displaying the
prototypes an a NSTextField displaying a description
of the currently selected prototype.
*/
@interface MPFunctionsViewController : NSViewController
/*!
@property collectionView
@abstract The NSCollectionView that displays the function
prototypes.
*/
@property (weak) IBOutlet NSCollectionView *collectionView;
/*!
@property functionPrototypes
@abstract Contains the @link
//apple_ref/occ/cl/MPFunction@/link objects that get
inserted into an expression if selected.
@discussion Every object in the array must be an @link
//apple_ref/occ/cl/MPFunction@/link 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