-
-#define INTF_CONTROL_CONFIG(x) \
-@interface VLC##x : NS##x \
-{ \
- NSString *o_module_name; \
- NSString *o_config_name; \
- int i_config_type; \
-} \
-- (void)setModuleName:(NSString *)_o_module_name; \
-- (void)setConfigName:(NSString *)_o_config_name; \
-- (void)setConfigType:(int)_i_config_type; \
-- (NSString *)moduleName; \
-- (NSString *)configName; \
-- (int)configType; \
-@end
-
-#define IMPL_CONTROL_CONFIG(x) \
-@implementation VLC##x \
-- (id)init \
-{ \
- self = [super init]; \
- if( self != nil ) \
- { \
- o_module_name = nil; \
- o_config_name = nil; \
- i_config_type = 0; \
- } \
- return( self ); \
-} \
-- (void)dealloc \
-{ \
- if( o_module_name != nil ) \
- { \
- [o_module_name release]; \
- } \
- if( o_config_name != nil ) \
- { \
- [o_config_name release]; \
- } \
- [super dealloc]; \
-} \
-- (void)setModuleName:(NSString *)_o_module_name \
-{ \
- if( o_module_name != nil ) \
- { \
- [o_module_name release]; \
- } \
- o_module_name = [_o_module_name retain]; \
-} \
-- (void)setConfigName:(NSString *)_o_config_name \
-{ \
- if( o_config_name != nil ) \
- { \
- [o_config_name release]; \
- } \
- o_config_name = [_o_config_name retain]; \
-} \
-- (void)setConfigType:(int)_i_config_type \
-{ \
- i_config_type = _i_config_type; \
-} \
-- (NSString *)moduleName \
-{ \
- return( o_module_name ); \
-} \
-- (NSString *)configName \
-{ \
- return( o_config_name ); \
-} \
-- (int)configType \
-{ \
- return( i_config_type ); \
-} \
-@end
-
-INTF_CONTROL_CONFIG(Button);
-INTF_CONTROL_CONFIG(PopUpButton);
-INTF_CONTROL_CONFIG(ComboBox);
-INTF_CONTROL_CONFIG(TextField);
-INTF_CONTROL_CONFIG(Slider);
-INTF_CONTROL_CONFIG(Matrix);
-
-#define CONTROL_CONFIG( obj, mname, ctype, cname ) \
- { \
- [obj setModuleName: mname]; \
- [obj setConfigType: ctype]; \
- [obj setConfigName: [NSString stringWithUTF8String: cname]]; \
- }
-