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 : NSView
28 module_config_t *p_item;
32 vlc_bool_t b_advanced;
36 + (VLCConfigControl *)newControl: (module_config_t *)p_item withView: (NSView *)o_parent_view withObject: (vlc_object_t *)p_this offset:(NSPoint) offset;
37 - (id)initWithFrame: (NSRect)frame item: (module_config_t *)p_item withObject: (vlc_object_t *)_p_this;
38 - (NSString *)getName;
44 - (char *)stringValue;
48 @interface KeyConfigControl : VLCConfigControl
57 @interface ModuleConfigControl : VLCConfigControl
59 NSPopUpButton *o_popup;
64 @interface StringConfigControl : VLCConfigControl
66 NSTextField *o_textfield;
71 @interface StringListConfigControl : VLCConfigControl
77 @interface FileConfigControl : VLCConfigControl
79 NSTextField *o_textfield;
84 - (IBAction)openFileDialog: (id)sender;
85 - (void)pathChosenInPanel:(NSOpenPanel *)o_sheet withReturn:(int)i_return_code contextInfo:(void *)o_context_info;
89 @interface IntegerConfigControl : VLCConfigControl
91 NSTextField *o_textfield;
95 - (IBAction)stepperChanged:(id)sender;
96 - (void)textfieldChanged:(NSNotification *)o_notification;
100 @interface IntegerListConfigControl : VLCConfigControl
107 @interface RangedIntegerConfigControl : VLCConfigControl
110 NSTextField *o_textfield;
111 NSTextField *o_textfield_min;
112 NSTextField *o_textfield_max;
115 - (IBAction)sliderChanged:(id)sender;
116 - (void)textfieldChanged:(NSNotification *)o_notification;
121 @interface FloatConfigControl : VLCConfigControl
123 NSTextField *o_textfield;
128 @interface RangedFloatConfigControl : VLCConfigControl
131 NSTextField *o_textfield;
132 NSTextField *o_textfield_min;
133 NSTextField *o_textfield_max;
136 - (IBAction)sliderChanged:(id)sender;
137 - (void)textfieldChanged:(NSNotification *)o_notification;
142 @interface BoolConfigControl : VLCConfigControl
144 NSButton *o_checkbox;