Preferences/PreferencesLexer.py

branch
sub_styles
changeset 6864
7837ab17f079
parent 6861
20899dc18e59
child 6866
b792455b35cd
equal deleted inserted replaced
6863:e900929889dd 6864:7837ab17f079
465 else: 465 else:
466 ok = True 466 ok = True
467 467
468 return ok 468 return ok
469 469
470 def isBaseStyle(self, style):
471 """
472 Public method to test, if a given style may have sub-styles.
473
474 @param style base style number
475 @type int
476 @return flag indicating that the style may have sub-styles
477 @rtype bool
478 """
479 return self.__lex.hasSubstyles() and self.__lex.isBaseStyle(style)
480
470 def addSubstyle(self, style): 481 def addSubstyle(self, style):
471 """ 482 """
472 Public method to add an empty sub-style to a given style. 483 Public method to add an empty sub-style to a given style.
473 484
474 @param style style number 485 @param style style number
475 @type int 486 @type int
476 @return allocated sub-style number or -1 to indicate an error 487 @return allocated sub-style number or -1 to indicate an error
477 @rtype int 488 @rtype int
478 """ 489 """
479 return self.__lex.addSubstyle(style) 490 return self.__lex.addSubstyle(style)
491
492 def delSubstyle(self, style, substyle):
493 """
494 Public method to delete a given sub-style definition.
495
496 @param style base style number
497 @type int
498 @param substyle sub-style number
499 @type int
500 @return flag indicating successful deletion
501 @rtype bool
502 """
503 return self.__lex.delSubstyle(style, substyle)

eric ide

mercurial