]> git.sesse.net Git - vlc/blob - modules/gui/macosx/prefs_widgets.h
Make the playlist info window a new object
[vlc] / modules / gui / macosx / prefs_widgets.h
1 /*****************************************************************************
2  * prefs_widgets.h: Preferences controls
3  *****************************************************************************
4  * Copyright (C) 2002-2003 VideoLAN
5  * $Id$
6  *
7  * Authors: Derk-Jan Hartman <hartman at videolan.org> 
8  *
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.
13  * 
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.
18  *
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  *****************************************************************************/
23
24
25 @interface VLCConfigControl : NSBox
26 {
27     vlc_object_t    *p_this;
28     char            *psz_name;
29     NSTextField     *o_label;
30     int             i_type;
31     vlc_bool_t      b_advanced;
32 }
33
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;
37 - (int)getType;
38 - (BOOL)isAdvanced;
39
40 - (int)intValue;
41 - (float)floatValue;
42 - (char *)stringValue;
43
44 @end
45
46 @interface KeyConfigControl : VLCConfigControl
47 {
48     NSMatrix        *o_matrix;
49     NSComboBox      *o_combo;
50 }
51
52 @end
53
54 @interface ModuleConfigControl : VLCConfigControl
55 {
56     NSPopUpButton   *o_popup;
57 }
58
59 @end
60
61 @interface StringConfigControl : VLCConfigControl
62 {
63     NSTextField     *o_textfield;
64 }
65
66 @end
67
68 @interface StringListConfigControl : VLCConfigControl
69 {
70     NSComboBox      *o_combo;
71 }
72
73 @end
74
75 @interface FileConfigControl : VLCConfigControl
76 {
77     NSTextField     *o_textfield;
78     NSButton        *o_button;
79     BOOL            b_directory;
80 }
81
82 - (IBAction)openFileDialog: (id)sender;
83 - (void)pathChosenInPanel:(NSOpenPanel *)o_sheet withReturn:(int)i_return_code contextInfo:(void  *)o_context_info;
84
85 @end
86
87 @interface IntegerConfigControl : VLCConfigControl
88 {
89     NSTextField     *o_textfield;
90     NSStepper       *o_stepper;
91 }
92
93 - (IBAction)stepperChanged:(id)sender;
94 - (void)textfieldChanged:(NSNotification *)o_notification;
95
96 @end
97
98 @interface IntegerListConfigControl : VLCConfigControl
99 {
100     NSComboBox      *o_combo;
101 }
102
103 @end
104
105 @interface RangedIntegerConfigControl : VLCConfigControl
106 {
107     NSSlider        *o_slider;
108     NSTextField     *o_textfield;
109     NSTextField     *o_textfield_min;
110     NSTextField     *o_textfield_max;
111 }
112
113 - (IBAction)sliderChanged:(id)sender;
114 - (void)textfieldChanged:(NSNotification *)o_notification;
115
116 @end
117
118 @interface FloatConfigControl : VLCConfigControl
119 {
120     NSTextField     *o_textfield;
121 }
122
123 @end
124
125 @interface RangedFloatConfigControl : VLCConfigControl
126 {
127     NSSlider        *o_slider;
128     NSTextField     *o_textfield;
129     NSTextField     *o_textfield_min;
130     NSTextField     *o_textfield_max;
131 }
132
133 - (IBAction)sliderChanged:(id)sender;
134 - (void)textfieldChanged:(NSNotification *)o_notification;
135
136 @end
137
138
139 @interface BoolConfigControl : VLCConfigControl
140 {
141     NSButton        *o_checkbox;
142 }
143
144 @end