Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

prefs_widgets.h

00001 /*****************************************************************************
00002  * prefs_widgets.h: Preferences controls
00003  *****************************************************************************
00004  * Copyright (C) 2002-2003 the VideoLAN team
00005  * $Id: prefs_widgets.h 12274 2005-08-19 16:16:34Z hartman $
00006  *
00007  * Authors: Derk-Jan Hartman <hartman at videolan.org> 
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  * 
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
00022  *****************************************************************************/
00023 
00024 #define CONFIG_ITEM_STRING_LIST (CONFIG_ITEM_STRING + 1)
00025 #define CONFIG_ITEM_RANGED_INTEGER (CONFIG_ITEM_INTEGER + 1)
00026 #define CONFIG_ITEM_KEY_BEFORE_10_3 (CONFIG_ITEM_KEY + 1)
00027 #define CONFIG_ITEM_KEY_AFTER_10_3 (CONFIG_ITEM_KEY + 2)
00028 #define LEFTMARGIN  18
00029 #define RIGHTMARGIN 18
00030 
00031 @interface VLCConfigControl : NSView
00032 {
00033     module_config_t *p_item;
00034     char            *psz_name;
00035     NSTextField     *o_label;
00036     int             i_type;
00037     int             i_view_type;
00038     vlc_bool_t      b_advanced;
00039 }
00040 
00041 + (VLCConfigControl *)newControl: (module_config_t *)_p_item
00042         withView: (NSView *)o_parent_view;
00043 - (id)initWithFrame: (NSRect)frame item: (module_config_t *)p_item;
00044 - (NSString *)getName;
00045 - (int)getType;
00046 - (int)getViewType;
00047 - (BOOL)isAdvanced;
00048 - (void)setYPos:(int)i_yPos;
00049 - (int)intValue;
00050 - (float)floatValue;
00051 - (char *)stringValue;
00052 - (void)applyChanges;
00053 - (int)getLabelSize;
00054 - (void) alignWithXPosition:(int)i_xPos;
00055 static NSMenu   *o_keys_menu = nil;
00056 
00057 + (int)calcVerticalMargin: (int)i_curItem lastItem:(int)i_lastItem;
00058 
00059 @end
00060 
00061 @interface StringConfigControl : VLCConfigControl
00062 {
00063     NSTextField     *o_textfield;
00064 }
00065 
00066 - (id) initWithItem: (module_config_t *)_p_item
00067            withView: (NSView *)o_parent_view;
00068 
00069 @end
00070 
00071 @interface StringListConfigControl : VLCConfigControl
00072 {
00073     NSComboBox      *o_combo;
00074 }
00075 
00076 - (id) initWithItem: (module_config_t *)_p_item
00077            withView: (NSView *)o_parent_view;
00078 
00079 @end
00080 
00081 @interface FileConfigControl : VLCConfigControl
00082 {
00083     NSTextField     *o_textfield;
00084     NSButton        *o_button;
00085     BOOL            b_directory;
00086 }
00087 
00088 - (id) initWithItem: (module_config_t *)_p_item
00089            withView: (NSView *)o_parent_view;
00090 
00091 - (IBAction)openFileDialog: (id)sender;
00092 - (void)pathChosenInPanel:(NSOpenPanel *)o_sheet withReturn:(int)i_return_code contextInfo:(void  *)o_context_info;
00093 
00094 @end
00095 
00096 @interface ModuleConfigControl : VLCConfigControl
00097 {
00098     NSPopUpButton   *o_popup;
00099 }
00100 
00101 - (id) initWithItem: (module_config_t *)_p_item
00102            withView: (NSView *)o_parent_view;
00103 
00104 @end
00105 
00106 @interface IntegerConfigControl : VLCConfigControl
00107 {
00108     NSTextField     *o_textfield;
00109     NSStepper       *o_stepper;
00110 }
00111 
00112 
00113 - (id) initWithItem: (module_config_t *)_p_item
00114            withView: (NSView *)o_parent_view;
00115 - (IBAction)stepperChanged:(id)sender;
00116 - (void)textfieldChanged:(NSNotification *)o_notification;
00117 
00118 @end
00119 
00120 @interface IntegerListConfigControl : VLCConfigControl
00121 {
00122     NSComboBox      *o_combo;
00123 }
00124 
00125 - (id) initWithItem: (module_config_t *)_p_item
00126            withView: (NSView *)o_parent_view;
00127 
00128 @end
00129 
00130 @interface RangedIntegerConfigControl : VLCConfigControl
00131 {
00132     NSSlider        *o_slider;
00133     NSTextField     *o_textfield;
00134     NSTextField     *o_textfield_min;
00135     NSTextField     *o_textfield_max;
00136 }
00137 
00138 
00139 - (id) initWithItem: (module_config_t *)_p_item
00140            withView: (NSView *)o_parent_view;
00141 - (IBAction)sliderChanged:(id)sender;
00142 - (void)textfieldChanged:(NSNotification *)o_notification;
00143 
00144 @end
00145 
00146 @interface BoolConfigControl : VLCConfigControl
00147 {
00148     NSButton        *o_checkbox;
00149 }
00150 
00151 - (id) initWithItem: (module_config_t *)_p_item
00152            withView: (NSView *)o_parent_view;
00153 
00154 @end
00155 
00156 @interface FloatConfigControl : VLCConfigControl
00157 {
00158     NSTextField     *o_textfield;
00159     NSStepper       *o_stepper;
00160 }
00161 
00162 
00163 - (id) initWithItem: (module_config_t *)_p_item
00164            withView: (NSView *)o_parent_view;
00165 - (IBAction)stepperChanged:(id)sender;
00166 - (void)textfieldChanged:(NSNotification *)o_notification;
00167 
00168 @end
00169 
00170 @interface RangedFloatConfigControl : VLCConfigControl
00171 {
00172     NSSlider        *o_slider;
00173     NSTextField     *o_textfield;
00174     NSTextField     *o_textfield_min;
00175     NSTextField     *o_textfield_max;
00176 }
00177 
00178 
00179 - (id) initWithItem: (module_config_t *)_p_item
00180            withView: (NSView *)o_parent_view;
00181 - (IBAction)sliderChanged:(id)sender;
00182 - (void)textfieldChanged:(NSNotification *)o_notification;
00183 
00184 @end
00185 
00186 @interface KeyConfigControlBefore103 : VLCConfigControl
00187 {
00188     NSButton        *o_cmd_checkbox;
00189     NSButton        *o_ctrl_checkbox;
00190     NSButton        *o_alt_checkbox;
00191     NSButton        *o_shift_checkbox;
00192     NSPopUpButton   *o_popup;
00193 }
00194 
00195 - (id) initWithItem: (module_config_t *)_p_item
00196            withView: (NSView *)o_parent_view;
00197 
00198 @end
00199 
00200 @interface KeyConfigControlAfter103 : VLCConfigControl
00201 {
00202     NSPopUpButton   *o_popup;
00203 }
00204 
00205 - (id) initWithItem: (module_config_t *)_p_item
00206            withView: (NSView *)o_parent_view;
00207 
00208 @end
00209 
00210 @interface ModuleListConfigControl : VLCConfigControl
00211 {
00212     NSTextField     *o_textfield;
00213     NSScrollView    *o_scrollview;
00214     NSMutableArray  *o_modulearray;
00215 }
00216 
00217 - (id) initWithItem: (module_config_t *)_p_item
00218            withView: (NSView *)o_parent_view;
00219            
00220 @end
00221 
00222 //#undef CONFIG_ITEM_LIST_STRING
00223 //#undef CONFIG_ITEM_RANGED_INTEGER
00224 //#undef CONFIG_ITEM_KEY_BEFORE_10_3
00225 //#undef CONFIG_ITEM_KEY_AFTER_10_3
00226 

Generated on Tue Dec 20 10:14:38 2005 for vlc-0.8.4a by  doxygen 1.4.2