Example #1
0
    def __init__(self, body, fontname=None, color=None, rightalign=False,
                 bold=False, italic=False, underline=False, strike=False,
                 charset=0, family=22):

        autoassign(self, locals())

        if isinstance(self.fontname, str):
            self.fontname = self.fontname.decode('fuzzy utf8')
        if isinstance(self.body, str):
            self.body = self.body.decode('fuzzy utf8')

        self.effects = ''
        if self.bold:
            self.effects += 'B'
        if self.italic:
            self.effects += 'I'
        if self.underline:
            self.effects += 'U'
        if self.strike:
            self.effects += 'S'

        if self.color is not None:
            self.r, self.g, self.b = self.color[:3]
        else:
            self.r = self.g = self.b = None

        self.__html = u''
Example #2
0
    def __init__(self, border = None, rounded = False, highlight = False, shadow = False):
        '''
        Any rectangular area.

        border    a wxPen object used to draw the edges
        rounded   if True, the rectangle is drawn with rounded corners
        highlight if True, the upper left corner is highlighted
        shadow    if True, the bottom right corner is shadowed
        '''
        if not isinstance(border, (type(None), wx.Pen)):
            raise TypeError('border must be a Pen or None')

        autoassign(self, locals())
        self.pen = wx.TRANSPARENT_PEN if border is None else border
Example #3
0
    def __init__(self,
                 border=None,
                 rounded=False,
                 highlight=False,
                 shadow=False):
        '''
        Any rectangular area.

        border    a wxPen object used to draw the edges
        rounded   if True, the rectangle is drawn with rounded corners
        highlight if True, the upper left corner is highlighted
        shadow    if True, the bottom right corner is shadowed
        '''
        if not isinstance(border, (type(None), wx.Pen)):
            raise TypeError('border must be a Pen or None')

        autoassign(self, locals())
        self.pen = wx.TRANSPARENT_PEN if border is None else border
Example #4
0
 def __init__(self, name, callable):
     Observable.__init__(self)
     funcs.autoassign(self, locals())
Example #5
0
 def __init__(self, title, *elems):
     if isinstance(title, tuple):
         title, prefix = title
     else:
         prefix = ''
     autoassign(self, locals())
Example #6
0
 def __init__( self, name, callable ):
     Observable.__init__(self)
     funcs.autoassign( self, locals() )
Example #7
0
 def __init__(self, title, *elems):
     if isinstance(title, tuple):
         title, prefix = title
     else:
         prefix = ''
     autoassign(self, locals())