]> git.sesse.net Git - vlc/blob - modules/gui/macosx/prefs_widgets.h
Removes trailing spaces. Removes tabs.
[vlc] / modules / gui / macosx / prefs_widgets.h
1 /*****************************************************************************
2  * prefs_widgets.h: Preferences controls
3  *****************************************************************************
4  * Copyright (C) 2002-2007 the VideoLAN team
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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 #define CONFIG_ITEM_STRING_LIST (CONFIG_ITEM_STRING + 1)
25 #define CONFIG_ITEM_RANGED_INTEGER (CONFIG_ITEM_INTEGER + 1)
26 #define CONFIG_ITEM_KEY_BEFORE_10_3 (CONFIG_ITEM_KEY + 1)
27 #define CONFIG_ITEM_KEY_AFTER_10_3 (CONFIG_ITEM_KEY + 2)
28 #define LEFTMARGIN  18
29 #define RIGHTMARGIN 18
30
31 @interface VLCConfigControl : NSView
32 {
33     module_config_t *p_item;
34     char            *psz_name;
35     NSTextField     *o_label;
36     int             i_type;
37     int             i_view_type;
38     vlc_bool_t      b_advanced;
39 }
40
41 + (VLCConfigControl *)newControl: (module_config_t *)_p_item
42         withView: (NSView *)o_parent_view;
43 - (id)initWithFrame: (NSRect)frame item: (module_config_t *)p_item;
44 - (NSString *)getName;
45 - (int)getType;
46 - (int)getViewType;
47 - (BOOL)isAdvanced;
48 - (void)setYPos:(int)i_yPos;
49 - (int)intValue;
50 - (float)floatValue;
51 - (char *)stringValue;
52 - (void)applyChanges;
53 - (int)getLabelSize;
54 - (void) alignWithXPosition:(int)i_xPos;
55 static NSMenu   *o_keys_menu = nil;
56
57 + (int)calcVerticalMargin: (int)i_curItem lastItem:(int)i_lastItem;
58
59 @end
60
61 @interface StringConfigControl : VLCConfigControl
62 {
63     NSTextField     *o_textfield;
64 }
65
66 - (id) initWithItem: (module_config_t *)_p_item
67            withView: (NSView *)o_parent_view;
68
69 @end
70
71 @interface StringListConfigControl : VLCConfigControl
72 {
73     NSComboBox      *o_combo;
74 }
75
76 - (id) initWithItem: (module_config_t *)_p_item
77            withView: (NSView *)o_parent_view;
78
79 @end
80
81 @interface FileConfigControl : VLCConfigControl
82 {
83     NSTextField     *o_textfield;
84     NSButton        *o_button;
85     BOOL            b_directory;
86 }
87
88 - (id) initWithItem: (module_config_t *)_p_item
89            withView: (NSView *)o_parent_view;
90
91 - (IBAction)openFileDialog: (id)sender;
92 - (void)pathChosenInPanel:(NSOpenPanel *)o_sheet withReturn:(int)i_return_code contextInfo:(void  *)o_context_info;
93
94 @end
95
96 @interface ModuleConfigControl : VLCConfigControl
97 {
98     NSPopUpButton   *o_popup;
99 }
100
101 - (id) initWithItem: (module_config_t *)_p_item
102            withView: (NSView *)o_parent_view;
103
104 @end
105
106 @interface IntegerConfigControl : VLCConfigControl
107 {
108     NSTextField     *o_textfield;
109     NSStepper       *o_stepper;
110 }
111
112
113 - (id) initWithItem: (module_config_t *)_p_item
114            withView: (NSView *)o_parent_view;
115 - (IBAction)stepperChanged:(id)sender;
116 - (void)textfieldChanged:(NSNotification *)o_notification;
117
118 @end
119
120 @interface IntegerListConfigControl : VLCConfigControl
121 {
122     NSComboBox      *o_combo;
123 }
124
125 - (id) initWithItem: (module_config_t *)_p_item
126            withView: (NSView *)o_parent_view;
127
128 @end
129
130 @interface RangedIntegerConfigControl : VLCConfigControl
131 {
132     NSSlider        *o_slider;
133     NSTextField     *o_textfield;
134     NSTextField     *o_textfield_min;
135     NSTextField     *o_textfield_max;
136 }
137
138
139 - (id) initWithItem: (module_config_t *)_p_item
140            withView: (NSView *)o_parent_view;
141 - (IBAction)sliderChanged:(id)sender;
142 - (void)textfieldChanged:(NSNotification *)o_notification;
143
144 @end
145
146 @interface BoolConfigControl : VLCConfigControl
147 {
148     NSButton        *o_checkbox;
149 }
150
151 - (id) initWithItem: (module_config_t *)_p_item
152            withView: (NSView *)o_parent_view;
153
154 @end
155
156 @interface FloatConfigControl : VLCConfigControl
157 {
158     NSTextField     *o_textfield;
159     NSStepper       *o_stepper;
160 }
161
162
163 - (id) initWithItem: (module_config_t *)_p_item
164            withView: (NSView *)o_parent_view;
165 - (IBAction)stepperChanged:(id)sender;
166 - (void)textfieldChanged:(NSNotification *)o_notification;
167
168 @end
169
170 @interface RangedFloatConfigControl : VLCConfigControl
171 {
172     NSSlider        *o_slider;
173     NSTextField     *o_textfield;
174     NSTextField     *o_textfield_min;
175     NSTextField     *o_textfield_max;
176 }
177
178
179 - (id) initWithItem: (module_config_t *)_p_item
180            withView: (NSView *)o_parent_view;
181 - (IBAction)sliderChanged:(id)sender;
182 - (void)textfieldChanged:(NSNotification *)o_notification;
183
184 @end
185
186 @interface KeyConfigControl : VLCConfigControl
187 {
188     NSPopUpButton   *o_popup;
189 }
190
191 - (id) initWithItem: (module_config_t *)_p_item
192            withView: (NSView *)o_parent_view;
193
194 @end
195
196 @interface ModuleListConfigControl : VLCConfigControl
197 {
198     NSTextField     *o_textfield;
199     NSScrollView    *o_scrollview;
200     NSMutableArray  *o_modulearray;
201 }
202
203 - (id) initWithItem: (module_config_t *)_p_item
204            withView: (NSView *)o_parent_view;
205  
206 @end
207
208 //#undef CONFIG_ITEM_LIST_STRING
209 //#undef CONFIG_ITEM_RANGED_INTEGER
210 //#undef CONFIG_ITEM_KEY_BEFORE_10_3
211 //#undef CONFIG_ITEM_KEY_AFTER_10_3
212