1 /*****************************************************************************
2 * SharedDialogs.h: MacOS X interface module
3 *****************************************************************************
4 * Copyright (C) 2012 Felix Paul Kühne
7 * Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
24 #import <Cocoa/Cocoa.h>
26 @interface VLCEnterTextPanel : NSObject
29 IBOutlet id _title_lbl;
30 IBOutlet id _subtitle_lbl;
31 IBOutlet id _text_fld;
32 IBOutlet id _cancel_btn;
38 NSString * _cancelTitle;
41 + (VLCEnterTextPanel *)sharedInstance;
43 @property (readwrite, assign) NSString *title;
44 @property (readwrite, assign) NSString *subTitle;
45 @property (readwrite, assign) NSString *OKButtonLabel;
46 @property (readwrite, assign) NSString *CancelButtonLabel;
47 @property (readwrite, assign) id target;
48 @property (readonly) NSString *enteredText;
50 - (void)runModalForWindow:(NSWindow *)window;
52 - (IBAction)windowElementAction:(id)sender;
56 @protocol VLCEnterTextPanel <NSObject>
58 - (void)panel:(VLCEnterTextPanel *)view returnValue:(NSUInteger)value text:(NSString *)text;
61 @interface VLCSelectItemInPopupPanel : NSObject
64 IBOutlet id _title_lbl;
65 IBOutlet id _subtitle_lbl;
67 IBOutlet id _cancel_btn;
73 NSString * _cancelTitle;
78 + (VLCSelectItemInPopupPanel *)sharedInstance;
80 @property (readwrite, assign) NSString *title;
81 @property (readwrite, assign) NSString *subTitle;
82 @property (readwrite, assign) NSString *OKButtonLabel;
83 @property (readwrite, assign) NSString *CancelButtonLabel;
84 @property (readwrite, assign) NSArray *popupButtonContent;
85 @property (readwrite, assign) id target;
86 @property (readonly) NSUInteger currentItem;
88 - (void)runModalForWindow:(NSWindow *)window;
90 - (IBAction)windowElementAction:(id)sender;
94 @protocol VLCSelectItemInPopupPanel <NSObject>
96 - (void)panel:(VLCSelectItemInPopupPanel *)panel returnValue:(NSUInteger)value item:(NSUInteger)item;