parameters: (self)
return_statement: return u"".join(sty_sheet)
docstring: Generates a style sheet from the dialogs style data
          @return: The dictionary of L{StyleItem} in self.styles_new transformed
                   into a string that is in Editra Style Sheet format.
docstring_summary: Generates a style sheet from the dialogs style data
          @return: The dictionary of L{StyleItem} in self.styles_new transformed
                   into a string that is in Editra Style Sheet format.
docstring_tokens: Generates a style sheet from the dialogs style data @return : The dictionary of L { StyleItem } in self . styles_new transformed into a string that is in Editra Style Sheet format .
function: def GenerateStyleSheet(self):
          """Generates a style sheet from the dialogs style data
          @return: The dictionary of L{StyleItem} in self.styles_new transformed
                   into a string that is in Editra Style Sheet format.
  
          """
          sty_sheet = list()
          ditem = self.styles_new.get('default_style', StyleItem())
          dvals = ';\n\t\t'.join([item.replace(',', ' ')
                                  for item in ditem.GetAsList() ]) + ';'
          sty_sheet.append(''.join(['default_style {\n\t\t', dvals, '\n\n}\n\n']))
  
          tags = sorted(self.styles_new.keys())
          for tag in tags:
              item = self.styles_new[tag]
              if item.IsNull() or tag == 'default_style':
                  continue
  
              stage1 = wx.EmptyString
              for attr in ('fore', 'back', 'face', 'size'):
                  ival = item.GetNamedAttr(attr)
                  if attr in ('fore', 'back'):
                      ival = ival.upper()
  
                  if ival is None or ival == ditem.GetNamedAttr(attr):
                      continue
  
                  stage1 = ''.join((stage1, attr, u':',
                                    ival.replace(',', ' '), u';'))
  
              # Add any modifiers to the modifier tag
              modifiers = item.GetModifiers()
              if len(modifiers):
                  stage1 += (u"modifiers:" + modifiers + u";").replace(',', ' ')
  
              # If the StyleItem had any set attributes add it to the stylesheet
              if len(stage1):
                  sty_sheet.append(tag + u" {\n")
                  stage2 = u"\t\t" + stage1[0:-1].replace(u";", u";\n\t\t") + u";"
                  sty_sheet.append(stage2)
                  sty_sheet.append(u"\n}\n\n")
  
          return u"".join(sty_sheet)
function_tokens: def GenerateStyleSheet ( self ) : sty_sheet = list ( ) ditem = self . styles_new . get ( 'default_style' , StyleItem ( ) ) dvals = ';\n\t\t' . join ( [ item . replace ( ',' , ' ' ) for item in ditem . GetAsList ( ) ] ) + ';' sty_sheet . append ( '' . join ( [ 'default_style {\n\t\t' , dvals , '\n\n}\n\n' ] ) ) tags = sorted ( self . styles_new . keys ( ) ) for tag in tags : item = self . styles_new [ tag ] if item . IsNull ( ) or tag == 'default_style' : continue stage1 = wx . EmptyString for attr in ( 'fore' , 'back' , 'face' , 'size' ) : ival = item . GetNamedAttr ( attr ) if attr in ( 'fore' , 'back' ) : ival = ival . upper ( ) if ival is None or ival == ditem . GetNamedAttr ( attr ) : continue stage1 = '' . join ( ( stage1 , attr , u':' , ival . replace ( ',' , ' ' ) , u';' ) ) # Add any modifiers to the modifier tag modifiers = item . GetModifiers ( ) if len ( modifiers ) : stage1 += ( u"modifiers:" + modifiers + u";" ) . replace ( ',' , ' ' ) # If the StyleItem had any set attributes add it to the stylesheet if len ( stage1 ) : sty_sheet . append ( tag + u" {\n" ) stage2 = u"\t\t" + stage1 [ 0 : - 1 ] . replace ( u";" , u";\n\t\t" ) + u";" sty_sheet . append ( stage2 ) sty_sheet . append ( u"\n}\n\n" ) return u"" . join ( sty_sheet )