1 /*****************************************************************************
2 * prefs_widgets.h: Preferences controls
3 *****************************************************************************
4 * Copyright (C) 2002-2003 VideoLAN
7 * Authors: Derk-Jan Hartman <hartman at videolan.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., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 *****************************************************************************/
25 @interface VLCConfigControl : NSBox
31 vlc_bool_t b_advanced;
34 + (VLCConfigControl *)newControl: (module_config_t *)p_item withView: (NSView *)o_parent_view withObject: (vlc_object_t *)p_this;
35 - (id)initWithFrame: (NSRect)frame item: (module_config_t *)p_item withObject: (vlc_object_t *)_p_this;
36 - (NSString *)getName;
42 - (char *)stringValue;
46 @interface KeyConfigControl : VLCConfigControl
54 @interface ModuleConfigControl : VLCConfigControl
56 NSPopUpButton *o_popup;
61 @interface StringConfigControl : VLCConfigControl
63 NSTextField *o_textfield;
68 @interface StringListConfigControl : VLCConfigControl
75 @interface FileConfigControl : VLCConfigControl
77 NSTextField *o_textfield;
82 - (IBAction)openFileDialog: (id)sender;
83 - (void)pathChosenInPanel:(NSOpenPanel *)o_sheet withReturn:(int)i_return_code contextInfo:(void *)o_context_info;
87 @interface IntegerConfigControl : VLCConfigControl
89 NSTextField *o_textfield;
93 - (IBAction)stepperChanged:(id)sender;
94 - (void)textfieldChanged:(NSNotification *)o_notification;
98 @interface IntegerListConfigControl : VLCConfigControl
105 @interface RangedIntegerConfigControl : VLCConfigControl
108 NSTextField *o_textfield;
109 NSTextField *o_textfield_min;
110 NSTextField *o_textfield_max;
113 - (IBAction)sliderChanged:(id)sender;
114 - (void)textfieldChanged:(NSNotification *)o_notification;
118 @interface FloatConfigControl : VLCConfigControl
120 NSTextField *o_textfield;
125 @interface RangedFloatConfigControl : VLCConfigControl
128 NSTextField *o_textfield;
129 NSTextField *o_textfield_min;
130 NSTextField *o_textfield_max;
133 - (IBAction)sliderChanged:(id)sender;
134 - (void)textfieldChanged:(NSNotification *)o_notification;
139 @interface BoolConfigControl : VLCConfigControl
141 NSButton *o_checkbox;