48 lines
1.8 KiB
Objective-C
48 lines
1.8 KiB
Objective-C
//
|
|
// MainController.h
|
|
// iLyrics
|
|
//
|
|
// Created by Kim Wittenburg on 10.06.12.
|
|
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
|
|
//
|
|
|
|
#import <Cocoa/Cocoa.h>
|
|
#import <Scripting/Scripting.h>
|
|
#import <ScriptingBridge/ScriptingBridge.h>
|
|
#import <AppKitScripting/AppKitScripting.h>
|
|
#import "iTunes.h"
|
|
#import "Magistrix.h"
|
|
#import "SearchResult.h"
|
|
#import "Lyrics.h"
|
|
#import <Growl/Growl.h>
|
|
|
|
@interface MainController : NSObject <NSWindowDelegate, NSOutlineViewDataSource, NSOutlineViewDelegate>
|
|
@property (weak) IBOutlet NSMenuItem *iLyricsMenuItem;
|
|
@property (unsafe_unretained) IBOutlet NSWindow *window;
|
|
@property (weak) IBOutlet NSSearchField *searchField;
|
|
@property (weak) IBOutlet NSOutlineView *resultsOutline;
|
|
@property (weak) IBOutlet NSButton *loadMoreResultsButton;
|
|
@property (weak) IBOutlet NSButton *showPreviewCheckBox;
|
|
@property (weak) IBOutlet NSPopover *previewPopover;
|
|
@property (unsafe_unretained) IBOutlet NSTextView *previewTextArea;
|
|
@property (weak) IBOutlet NSTextField *songLabel;
|
|
@property (weak) IBOutlet NSTextField *artistLabel;
|
|
@property (weak) IBOutlet NSButton *sendToiTunesButton;
|
|
@property (weak) IBOutlet NSButton *downloadLyricsButton;
|
|
@property (unsafe_unretained) IBOutlet NSTextView *lyricsArea;
|
|
@property (readonly) Lyrics *currentLyrics;
|
|
|
|
- (IBAction)getCurrentiTunesSong:(id)sender;
|
|
- (IBAction)startNewSearch:(id)sender;
|
|
- (IBAction)loadNextResults:(id)sender;
|
|
- (IBAction)resetLoadedResults:(id)sender;
|
|
- (IBAction)lyricsSelectionChanged:(NSOutlineView *)sender;
|
|
- (IBAction)sendLyricsToiTunes:(id)sender;
|
|
- (IBAction)downloadLyrics:(id)sender;
|
|
- (IBAction)showLyricsInBrowser:(id)sender;
|
|
- (IBAction)showiLyricsWindow:(id)sender;
|
|
- (void)saveToDefalts: (NSUserDefaults *)defaults;
|
|
- (void)loadFromDefaults: (NSUserDefaults *)defaults;
|
|
|
|
@end
|