]> git.sesse.net Git - vlc/blob - modules/gui/macosx/prefs_widgets.h
Work on MacOS preferences. Need to be completed, improved, and debugged...
[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 : NSView
26 {
27     vlc_object_t    *p_this;
28     module_config_t *p_item;
29     char            *psz_name;
30     NSTextField     *o_label;
31     int             i_type;
32     vlc_bool_t      b_advanced;
33     NSView          *contentView;
34 }
35
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;
39 - (int)getType;
40 - (BOOL)isAdvanced;
41
42 - (int)intValue;
43 - (float)floatValue;
44 - (char *)stringValue;
45
46 @end
47
48 @interface KeyConfigControl : VLCConfigControl
49 {
50     NSMatrix        *o_matrix;
51     NSComboBox      *o_combo;
52 }
53
54 @end
55 #if 0
56
57 @interface ModuleConfigControl : VLCConfigControl
58 {
59     NSPopUpButton   *o_popup;
60 }
61
62 @end
63 #endif
64 @interface StringConfigControl : VLCConfigControl
65 {
66     NSTextField     *o_textfield;
67 }
68
69 @end
70
71 @interface StringListConfigControl : VLCConfigControl
72 {
73     NSComboBox      *o_combo;
74 }
75
76 @end
77 @interface FileConfigControl : VLCConfigControl
78 {
79     NSTextField     *o_textfield;
80     NSButton        *o_button;
81     BOOL            b_directory;
82 }
83
84 - (IBAction)openFileDialog: (id)sender;
85 - (void)pathChosenInPanel:(NSOpenPanel *)o_sheet withReturn:(int)i_return_code contextInfo:(void  *)o_context_info;
86
87 @end
88
89 @interface IntegerConfigControl : VLCConfigControl
90 {
91     NSTextField     *o_textfield;
92     NSStepper       *o_stepper;
93 }
94
95 - (IBAction)stepperChanged:(id)sender;
96 - (void)textfieldChanged:(NSNotification *)o_notification;
97
98 @end
99
100 @interface IntegerListConfigControl : VLCConfigControl
101 {
102     NSComboBox      *o_combo;
103 }
104
105 @end
106
107 @interface RangedIntegerConfigControl : VLCConfigControl
108 {
109     NSSlider        *o_slider;
110     NSTextField     *o_textfield;
111     NSTextField     *o_textfield_min;
112     NSTextField     *o_textfield_max;
113 }
114
115 - (IBAction)sliderChanged:(id)sender;
116 - (void)textfieldChanged:(NSNotification *)o_notification;
117
118 @end
119 #if 0
120
121 @interface FloatConfigControl : VLCConfigControl
122 {
123     NSTextField     *o_textfield;
124 }
125
126 @end
127
128 @interface RangedFloatConfigControl : VLCConfigControl
129 {
130     NSSlider        *o_slider;
131     NSTextField     *o_textfield;
132     NSTextField     *o_textfield_min;
133     NSTextField     *o_textfield_max;
134 }
135
136 - (IBAction)sliderChanged:(id)sender;
137 - (void)textfieldChanged:(NSNotification *)o_notification;
138
139 @end
140
141
142 @interface BoolConfigControl : VLCConfigControl
143 {
144     NSButton        *o_checkbox;
145 }
146
147 @end
148 #endif