summaryrefslogtreecommitdiff
path: root/VKPC/PopoverController.h
blob: 498f8068d993f5b3bd6bc023164d38166e02185c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//
//  PopoverController.h
//  VKPC
//
//  Created by Eugene on 11/30/13.
//  Copyright (c) 2013-2014 Eugene Z. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <Sparkle/SUUpdater.h>

@class PlaylistTableView, FlippedView, Popover, AboutWindowController, PreferencesWindowController, ShadowTextFieldCell, VibrantTextField, VibrantButton;

@interface PopoverController : NSViewController

@property (strong) IBOutlet NSArrayController *playlistArrayController;
@property (weak) IBOutlet VibrantTextField *titleTextField;
@property (weak) IBOutlet ShadowTextFieldCell *titleTextFieldCell;
@property (strong) IBOutlet NSMenu *browserMenu;
@property (strong) IBOutlet NSMenu *appMenu;
//@property (weak) IBOutlet FlippedView *_view;
@property (weak) IBOutlet PlaylistTableView *playlistTableView;
@property (weak) IBOutlet NSView *customView;
@property (weak) IBOutlet NSScrollView *scrollView;
@property (weak) IBOutlet NSImageCell *titleSeparatorImageCell;
@property (weak) IBOutlet NSButtonCell *settingsButtonCell;
@property (weak) IBOutlet VibrantButton *settingsButton;
@property (strong) IBOutlet FlippedView *view;

// Placeholder and system configuration button
@property (weak) IBOutlet VibrantTextField *playlistNotLoadedTextField;
//@property (weak) IBOutlet NSButton *systemConfigurationRequiredButton;

// Settings menu outlets
@property (weak) IBOutlet NSMenuItem *menuItemShowNotifications;
@property (weak) IBOutlet NSMenuItem *menuItemInvert;
@property (weak) IBOutlet NSMenuItem *menuItemCatch;
@property (weak) IBOutlet NSMenuItem *menuItemAutostart;

@property (strong) PlaylistTableController *playlistTableController;
@property (assign, nonatomic) PopoverState state;

/*@property (weak) IBOutlet NSMenuItem *menuItemBrowserChrome;
@property (weak) IBOutlet NSMenuItem *menuItemBrowserFirefox;
@property (weak) IBOutlet NSMenuItem *menuItemBrowserSafari;
@property (weak) IBOutlet NSMenuItem *menuItemBrowserOpera;
@property (weak) IBOutlet NSMenuItem *menuItemBrowserYandex;*/
@property (strong) IBOutlet SUUpdater *sparkleUpdater;
@property (weak) IBOutlet NSMenuItem *useExtensionMode;
@property (weak) IBOutlet NSMenuItem *downloadExtensionsMenuItem;

+ (PopoverController *)shared;

// Actions
- (IBAction)menuButtonAction:(id)sender;
- (IBAction)systemConfigurationRequiredAction:(id)sender;

// Settings actions
- (IBAction)menuItemShowNotificationsAction:(id)sender;
- (IBAction)menuItemInvertAction:(id)sender;
- (IBAction)menuItemCatchAction:(id)sender;
- (IBAction)menuItemAutostartAction:(id)sender;
- (IBAction)menuItemAboutAction:(id)sender;
- (IBAction)menuItemQuitAction:(id)sender;
- (IBAction)menuItemBrowserAction:(id)sender;
- (IBAction)menuItemDownloadExtensionsAction:(id)sender;
- (IBAction)menuItemCheckForUpdatesAction:(id)sender;
- (IBAction)useExtensionModeAction:(id)sender;

//- (void)initPlaceholder;
//- (void)initPlaylist;
- (void)resizeWithContentHeight:(int)height;
- (void)doResizeWithContentHeight:(int)height animate:(BOOL)animate;
- (void)popoverDidShow;
- (void)popoverDidHide;
- (void)updateTitle:(NSString *)title;
- (void)setState:(PopoverState)state;

@end