Ejemplo n.º 1
0
def conv_align(val):
    # This should work, but Tk doesn't actually do the right
    # thing so for now everything gets mapped to BASELINE
    # alignment.
    return BASELINE
    conv = grailutil.conv_enumeration(
        grailutil.conv_normstring(val),
        {'top': TOP,
         'middle': CENTER,              # not quite right
         'bottom': BASELINE,
         'absbottom': BOTTOM,           # compatibility hack...
         'absmiddle': CENTER,           # compatibility hack...
         })
    if conv: return conv
    else: return CENTER
Ejemplo n.º 2
0
def conv_align(val):
    # This should work, but Tk doesn't actually do the right
    # thing so for now everything gets mapped to BASELINE
    # alignment.
    return BASELINE
    conv = grailutil.conv_enumeration(
        grailutil.conv_normstring(val),
        {'top': TOP,
         'middle': CENTER,              # not quite right
         'bottom': BASELINE,
         'absbottom': BOTTOM,           # compatibility hack...
         'absmiddle': CENTER,           # compatibility hack...
         })
    if conv: return conv
    else: return CENTER
Ejemplo n.º 3
0
 def conv_rules(val):
     return grailutil.conv_enumeration(
         grailutil.conv_normstring(val),
         ['none', 'groups', 'rows', 'cols', 'all'])
Ejemplo n.º 4
0
 def conv_frame(val):
     return grailutil.conv_enumeration(
         grailutil.conv_normstring(val),
         ['void', 'above', 'below', 'hsides', 'lhs', 'rhs',
          'vsides', 'box', 'border'])
Ejemplo n.º 5
0
def conv_halign(val):
    return grailutil.conv_enumeration(grailutil.conv_normstring(val),
                              ['left', 'center', 'right', 'justify', 'char'])
Ejemplo n.º 6
0
def conv_valign(val):
    return grailutil.conv_enumeration(grailutil.conv_normstring(val),
                                      ['top', 'middle', 'bottom', 'baseline'])
Ejemplo n.º 7
0
 def conv_align(val):
     return grailutil.conv_enumeration(
         grailutil.conv_normstring(val),
         ['top', 'bottom', 'left', 'right']) or 'top'
Ejemplo n.º 8
0
 def conv_rules(val):
     return grailutil.conv_enumeration(
         grailutil.conv_normstring(val),
         ['none', 'groups', 'rows', 'cols', 'all'])
Ejemplo n.º 9
0
 def conv_frame(val):
     return grailutil.conv_enumeration(grailutil.conv_normstring(val), [
         'void', 'above', 'below', 'hsides', 'lhs', 'rhs', 'vsides',
         'box', 'border'
     ])
Ejemplo n.º 10
0
def conv_halign(val):
    return grailutil.conv_enumeration(
        grailutil.conv_normstring(val),
        ['left', 'center', 'right', 'justify', 'char'])
Ejemplo n.º 11
0
def conv_valign(val):
    return grailutil.conv_enumeration(grailutil.conv_normstring(val),
                                      ['top', 'middle', 'bottom', 'baseline'])
Ejemplo n.º 12
0
 def conv_align(val):
     return grailutil.conv_enumeration(
         grailutil.conv_normstring(val),
         ['top', 'bottom', 'left', 'right']) or 'top'