//
//  ECMoviePreviewPanelController.m
//  Etokicho
//
//  Created by 二鏡 on 11/11/21.
//  Copyright 2011年 二鏡庵. All rights reserved.
//

#import "ECMoviePreviewPanelController.h"

static id _si = nil;

@implementation ECMoviePreviewPanelController
+ (id)sharedPanel
{
    if(_si == nil)
    {
        _si = [[self alloc] initWithWindowNibName: @"MoviePreview"];
        [_si window];
    }
    return _si;
}

- (void)awakeFromNib
{
    [self setWindowFrameAutosaveName: @"MoviePreviewPanelFrame"];
}

- (void)setMovie:(QTMovie*)aMovie
{
    view.movie = aMovie;
    NSSize size = [[aMovie attributeForKey: QTMovieNaturalSizeAttribute] sizeValue];
    size.height += [view controllerBarHeight];
    [self.window setContentSize: size];
}

@end
