prefs_widgets.m File Reference

Include dependency graph for prefs_widgets.m:


Defines

#define PREFS_WRAP   300
#define OFFSET_RIGHT   20
#define OFFSET_BETWEEN   2
#define UPWARDS_WHITE_ARROW   "\xE2\x87\xA7"
#define OPTION_KEY   "\xE2\x8C\xA5"
#define UP_ARROWHEAD   "\xE2\x8C\x83"
#define PLACE_OF_INTEREST_SIGN   "\xE2\x8C\x98"
#define POPULATE_A_KEY(o_menu, string, value)
#define ADD_LABEL(o_label, superFrame, x_offset, my_y_offset, label,tooltip)
#define ADD_TEXTFIELD(o_textfield, superFrame, x_offset, my_y_offset,my_width, tooltip, init_value)
#define ADD_SECURETEXTFIELD(o_textfield, superFrame, x_offset, my_y_offset,my_width, tooltip, init_value)
#define ADD_COMBO(o_combo, superFrame, x_offset, my_y_offset, x2_offset,tooltip)
#define ADD_RIGHT_BUTTON(o_button, superFrame, x_offset, my_y_offset,tooltip, title)
#define ADD_POPUP(o_popup, superFrame, x_offset, my_y_offset, x2_offset,tooltip)
#define ADD_STEPPER(o_stepper, superFrame, x_offset, my_y_offset, tooltip, lower, higher)
#define ADD_SLIDER(o_slider, superFrame, x_offset, my_y_offset, my_width,tooltip, lower, higher)
#define ADD_CHECKBOX(o_checkbox, superFrame, x_offset, my_y_offset, label, tooltip, init_value, position)

Define Documentation

#define ADD_CHECKBOX ( o_checkbox,
superFrame,
x_offset,
my_y_offset,
label,
tooltip,
init_value,
position   ) 

Value:

{                                                                           \
    NSRect s_rc = superFrame;                                               \
    s_rc.size.height = 18;                                                  \
    s_rc.origin.x = x_offset - 2;                                           \
    s_rc.origin.y = superFrame.size.height - 18 + my_y_offset;              \
    o_checkbox = [[[NSButton alloc] initWithFrame: s_rc] retain];           \
    [o_checkbox setFont:[NSFont systemFontOfSize:0]];                       \
    [o_checkbox setButtonType: NSSwitchButton];                             \
    [o_checkbox setImagePosition: position];                                \
    [o_checkbox setIntValue: init_value];                                   \
    [o_checkbox setTitle: label];                                           \
    [o_checkbox setToolTip: tooltip];                                       \
    [o_checkbox sizeToFit];                                                 \
}

Referenced by BoolConfigControl::initWithItem:withView:.

#define ADD_COMBO ( o_combo,
superFrame,
x_offset,
my_y_offset,
x2_offset,
tooltip   ) 

Value:

{                                                                           \
    NSRect s_rc = superFrame;                                               \
    s_rc.origin.x = x_offset + 2;                                           \
    s_rc.origin.y = my_y_offset;                                            \
    s_rc.size.height = 26;                                                  \
    s_rc.size.width = superFrame.size.width + 2 - s_rc.origin.x -           \
        (x2_offset);                                                        \
    o_combo = [[[NSComboBox alloc] initWithFrame: s_rc] retain];            \
    [o_combo setFont:[NSFont systemFontOfSize:0]];                          \
    [o_combo setToolTip: tooltip];                                          \
    [o_combo setUsesDataSource:TRUE];                                       \
    [o_combo setDataSource:self];                                           \
    [o_combo setNumberOfVisibleItems:10];                                   \
    [o_combo setCompletes:YES];                                             \
}

Referenced by IntegerListConfigControl::initWithItem:withView:, and StringListConfigControl::initWithItem:withView:.

#define ADD_LABEL ( o_label,
superFrame,
x_offset,
my_y_offset,
label,
tooltip   ) 

Value:

{                                                                           \
    NSRect s_rc = superFrame;                                               \
    s_rc.size.height = 17;                                                  \
    s_rc.origin.x = x_offset - 3;                                           \
    s_rc.origin.y = superFrame.size.height - 17 + my_y_offset;              \
    o_label = [[[NSTextField alloc] initWithFrame: s_rc] retain];           \
    [o_label setDrawsBackground: NO];                                       \
    [o_label setBordered: NO];                                              \
    [o_label setEditable: NO];                                              \
    [o_label setSelectable: NO];                                            \
    [o_label setStringValue: label];                                        \
    [o_label setToolTip: tooltip];                                          \
    [o_label setFont:[NSFont systemFontOfSize:0]];                          \
    [o_label sizeToFit];                                                    \
}

Referenced by ModuleListConfigControl::initWithItem:withView:, KeyConfigControl::initWithItem:withView:, BoolConfigControl::initWithItem:withView:, RangedFloatConfigControl::initWithItem:withView:, FloatConfigControl::initWithItem:withView:, RangedIntegerConfigControl::initWithItem:withView:, IntegerListConfigControl::initWithItem:withView:, IntegerConfigControl::initWithItem:withView:, ModuleConfigControl::initWithItem:withView:, FileConfigControl::initWithItem:withView:, StringListConfigControl::initWithItem:withView:, and StringConfigControl::initWithItem:withView:.

#define ADD_POPUP ( o_popup,
superFrame,
x_offset,
my_y_offset,
x2_offset,
tooltip   ) 

Value:

{                                                                           \
    NSRect s_rc = superFrame;                                               \
    s_rc.origin.x = x_offset - 1;                                           \
    s_rc.origin.y = my_y_offset;                                            \
    s_rc.size.height = 26;                                                  \
    s_rc.size.width = superFrame.size.width + 2 - s_rc.origin.x -           \
        (x2_offset);                                                        \
    o_popup = [[[NSPopUpButton alloc] initWithFrame: s_rc] retain];         \
    [o_popup setFont:[NSFont systemFontOfSize:0]];                          \
    [o_popup setToolTip: tooltip];                                          \
}

Referenced by KeyConfigControl::initWithItem:withView:, and ModuleConfigControl::initWithItem:withView:.

#define ADD_RIGHT_BUTTON ( o_button,
superFrame,
x_offset,
my_y_offset,
tooltip,
title   ) 

Value:

{                                                                           \
    NSRect s_rc = superFrame;                                               \
    o_button = [[[NSButton alloc] initWithFrame: s_rc] retain];             \
    [o_button setButtonType: NSMomentaryPushInButton];                      \
    [o_button setBezelStyle: NSRoundedBezelStyle];                          \
    [o_button setTitle: title];                                             \
    [o_button setFont:[NSFont systemFontOfSize:0]];                         \
    [o_button sizeToFit];                                                   \
    s_rc = [o_button frame];                                                \
    s_rc.origin.x = superFrame.size.width - [o_button frame].size.width - 6;\
    s_rc.origin.y = my_y_offset - 6;                                        \
    s_rc.size.width += 12;                                                  \
    [o_button setFrame: s_rc];                                              \
    [o_button setToolTip: tooltip];                                         \
    [o_button setTarget: self];                                             \
    [o_button setAction: @selector(openFileDialog:)];                       \
}

Referenced by FileConfigControl::initWithItem:withView:.

#define ADD_SECURETEXTFIELD ( o_textfield,
superFrame,
x_offset,
my_y_offset,
my_width,
tooltip,
init_value   ) 

Value:

{                                                                           \
NSRect s_rc = superFrame;                                               \
s_rc.origin.x = x_offset;                                               \
s_rc.origin.y = my_y_offset;                                            \
s_rc.size.height = 22;                                                  \
s_rc.size.width = my_width;                                             \
o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
[o_textfield setFont:[NSFont systemFontOfSize:0]];                      \
[o_textfield setToolTip: tooltip];                                      \
[o_textfield setStringValue: init_value];                               \
}

Referenced by StringConfigControl::initWithItem:withView:.

#define ADD_SLIDER ( o_slider,
superFrame,
x_offset,
my_y_offset,
my_width,
tooltip,
lower,
higher   ) 

Value:

{                                                                           \
    NSRect s_rc = superFrame;                                               \
    s_rc.origin.x = x_offset;                                               \
    s_rc.origin.y = my_y_offset;                                            \
    s_rc.size.height = 21;                                                  \
    s_rc.size.width = my_width;                                             \
    o_slider = [[[NSSlider alloc] initWithFrame: s_rc] retain];             \
    [o_slider setFont:[NSFont systemFontOfSize:0]];                         \
    [o_slider setToolTip: tooltip];                                         \
    [o_slider setMaxValue: higher];                                         \
    [o_slider setMinValue: lower];                                          \
}

Referenced by RangedFloatConfigControl::initWithItem:withView:, and RangedIntegerConfigControl::initWithItem:withView:.

#define ADD_STEPPER ( o_stepper,
superFrame,
x_offset,
my_y_offset,
tooltip,
lower,
higher   ) 

Value:

{                                                                           \
    NSRect s_rc = superFrame;                                               \
    s_rc.origin.x = x_offset;                                               \
    s_rc.origin.y = my_y_offset;                                            \
    s_rc.size.height = 23;                                                  \
    s_rc.size.width = 23;                                                   \
    o_stepper = [[[NSStepper alloc] initWithFrame: s_rc] retain];           \
    [o_stepper setFont:[NSFont systemFontOfSize:0]];                        \
    [o_stepper setToolTip: tooltip];                                        \
    [o_stepper setMaxValue: higher];                                        \
    [o_stepper setMinValue: lower];                                         \
    [o_stepper setTarget: self];                                            \
    [o_stepper setAction: @selector(stepperChanged:)];                      \
    [o_stepper sendActionOn:NSLeftMouseUpMask | NSLeftMouseDownMask |       \
        NSLeftMouseDraggedMask];                                            \
}

Referenced by FloatConfigControl::initWithItem:withView:, and IntegerConfigControl::initWithItem:withView:.

#define ADD_TEXTFIELD ( o_textfield,
superFrame,
x_offset,
my_y_offset,
my_width,
tooltip,
init_value   ) 

Value:

{                                                                           \
    NSRect s_rc = superFrame;                                               \
    s_rc.origin.x = x_offset;                                               \
    s_rc.origin.y = my_y_offset;                                            \
    s_rc.size.height = 22;                                                  \
    s_rc.size.width = my_width;                                             \
    o_textfield = [[[NSTextField alloc] initWithFrame: s_rc] retain];       \
    [o_textfield setFont:[NSFont systemFontOfSize:0]];                      \
    [o_textfield setToolTip: tooltip];                                      \
    [o_textfield setStringValue: init_value];                               \
}

Referenced by ModuleListConfigControl::initWithItem:withView:, RangedFloatConfigControl::initWithItem:withView:, FloatConfigControl::initWithItem:withView:, RangedIntegerConfigControl::initWithItem:withView:, IntegerConfigControl::initWithItem:withView:, FileConfigControl::initWithItem:withView:, and StringConfigControl::initWithItem:withView:.

#define OFFSET_BETWEEN   2

#define OFFSET_RIGHT   20

#define OPTION_KEY   "\xE2\x8C\xA5"

#define PLACE_OF_INTEREST_SIGN   "\xE2\x8C\x98"

#define POPULATE_A_KEY ( o_menu,
string,
value   ) 

#define PREFS_WRAP   300

#define UP_ARROWHEAD   "\xE2\x8C\x83"

#define UPWARDS_WHITE_ARROW   "\xE2\x87\xA7"


Generated on Tue May 25 08:05:18 2010 for VLC by  doxygen 1.5.6