wxPython/wxGlade-0.9.1/wcodegen/__init__.py
def generate_code_bitmap(self, bitmap):
        """Returns a code fragment that generates an wxBitmap object

        bitmap: Bitmap definition string

        see: tmpl_inline_bitmap, get_inline_stmt_emptybitmap(), get_inline_stmt_artprovider()"""
        assert self.tmpl_inline_bitmap

        if not bitmap:
            return self.codegen.cn('wxNullBitmap')
        preview = self.codegen.preview

        if preview and ( bitmap.startswith('var:') or bitmap.startswith('code:') ):
            preview_icon = os.path.join(config.icons_path, "icon.xpm")
            return self.tmpl_inline_bitmap % { 'name': self.codegen.cn('wxBitmap'),
                                               'bitmap': self.codegen.quote_path(preview_icon),
                                               'bitmap_type': self.codegen.cn('wxBITMAP_TYPE_XPM') }

        if bitmap.startswith('var:'):
            return self.tmpl_inline_bitmap % { 'name': self.codegen.cn('wxBitmap'),
                                               'bitmap': bitmap[4:].strip(),
                                               'bitmap_type': self.codegen.cn('wxBITMAP_TYPE_ANY') }

        if bitmap.startswith('empty:'): return self.get_inline_stmt_emptybitmap(bitmap)
        if bitmap.startswith('art:'):   return self.get_inline_stmt_artprovider(bitmap) 
        if bitmap.startswith('code:'):  return '%s' % self.codegen.cn(bitmap[5:].strip())

        if preview:
            bitmap = misc.get_absolute_path(bitmap, True)

        return self.tmpl_inline_bitmap % { 'name': self.codegen.cn('wxBitmap'),
                                           'bitmap': self.codegen.quote_path(bitmap),
                                           'bitmap_type': self.codegen.cn('wxBITMAP_TYPE_ANY') }
Returns a code fragment that generates an wxBitmap object

        bitmap: Bitmap definition string

        see: tmpl_inline_bitmap, get_inline_stmt_emptybitmap(), get_inline_stmt_artprovider()
Returns a code fragment that generates an wxBitmap object
bitmap: Bitmap definition string


Returns a code fragment that generates an wxBitmap object bitmap : Bitmap definition string
def generate_code_bitmap(self, bitmap):
        assert self.tmpl_inline_bitmap
        if not bitmap:
            return self.codegen.cn('wxNullBitmap')
        preview = self.codegen.preview
        if preview and ( bitmap.startswith('var:') or bitmap.startswith('code:') ):
            preview_icon = os.path.join(config.icons_path, "icon.xpm")
            return self.tmpl_inline_bitmap % { 'name': self.codegen.cn('wxBitmap'),
                                               'bitmap': self.codegen.quote_path(preview_icon),
                                               'bitmap_type': self.codegen.cn('wxBITMAP_TYPE_XPM') }
        if bitmap.startswith('var:'):
            return self.tmpl_inline_bitmap % { 'name': self.codegen.cn('wxBitmap'),
                                               'bitmap': bitmap[4:].strip(),
                                               'bitmap_type': self.codegen.cn('wxBITMAP_TYPE_ANY') }
        if bitmap.startswith('empty:'): return self.get_inline_stmt_emptybitmap(bitmap)
        if bitmap.startswith('art:'):   return self.get_inline_stmt_artprovider(bitmap) 
        if bitmap.startswith('code:'):  return '%s' % self.codegen.cn(bitmap[5:].strip())
        if preview:
            bitmap = misc.get_absolute_path(bitmap, True)
        return self.tmpl_inline_bitmap % { 'name': self.codegen.cn('wxBitmap'),
                                           'bitmap': self.codegen.quote_path(bitmap),
                                           'bitmap_type': self.codegen.cn('wxBITMAP_TYPE_ANY') }
def generate_code_bitmap ( self , bitmap ) : assert self . tmpl_inline_bitmap if not bitmap : return self . codegen . cn ( 'wxNullBitmap' ) preview = self . codegen . preview if preview and ( bitmap . startswith ( 'var:' ) or bitmap . startswith ( 'code:' ) ) : preview_icon = os . path . join ( config . icons_path , "icon.xpm" ) return self . tmpl_inline_bitmap % { 'name' : self . codegen . cn ( 'wxBitmap' ) , 'bitmap' : self . codegen . quote_path ( preview_icon ) , 'bitmap_type' : self . codegen . cn ( 'wxBITMAP_TYPE_XPM' ) } if bitmap . startswith ( 'var:' ) : return self . tmpl_inline_bitmap % { 'name' : self . codegen . cn ( 'wxBitmap' ) , 'bitmap' : bitmap [ 4 : ] . strip ( ) , 'bitmap_type' : self . codegen . cn ( 'wxBITMAP_TYPE_ANY' ) } if bitmap . startswith ( 'empty:' ) : return self . get_inline_stmt_emptybitmap ( bitmap ) if bitmap . startswith ( 'art:' ) : return self . get_inline_stmt_artprovider ( bitmap ) if bitmap . startswith ( 'code:' ) : return '%s' % self . codegen . cn ( bitmap [ 5 : ] . strip ( ) ) if preview : bitmap = misc . get_absolute_path ( bitmap , True ) return self . tmpl_inline_bitmap % { 'name' : self . codegen . cn ( 'wxBitmap' ) , 'bitmap' : self . codegen . quote_path ( bitmap ) , 'bitmap_type' : self . codegen . cn ( 'wxBITMAP_TYPE_ANY' ) }
Returns a code fragment that generates an wxBitmap object
bitmap: Bitmap definition string
Returns a code fragment that generates an wxBitmap object bitmap : Bitmap definition string
"""Returns a code fragment that generates an wxBitmap object

        bitmap: Bitmap definition string

        see: tmpl_inline_bitmap, get_inline_stmt_emptybitmap(), get_inline_stmt_artprovider()"""
self
bitmap