;ò [q¿Dc@s6yedeefƒWn"ej oeZd„ZnXd„Zd„Zd„Zdfd„ƒYZdefd„ƒYZ d efd „ƒYZ d efd „ƒYZ d efd„ƒYZ defd„ƒYZ e ƒZd„Zd„Zdfd„ƒYZdefd„ƒYZdefd„ƒYZdS(icCs^dk}t||iƒot||ƒSnx&|D]}t||ƒodSq4q4WdSdS(Nii(stypess _isinstancesclsargs ClassTypesinstancescls(sinstancesclsargsclsstypes((s</mnt/gmirror/ports/graphics/py-PyX/work/PyX-0.10/pyx/attr.pys isinstances  cCsNg}x=|D]5}t|tƒo|i|ƒ}q tdƒ‚q W|SdS(saperform merging of the attribute list attrs as defined by the merge methods of the attributess-only instances of class attr.attr are allowedN(snewattrssattrssas isinstancesattrsmerges TypeError(sattrssasnewattrs((s</mnt/gmirror/ports/graphics/py-PyX/work/PyX-0.10/pyx/attr.pys mergeattrs,scCsCgi}|D]*}t|t|ƒƒo||ƒqq~SdS(snreturn all attributes in the attribute list attrs, which are instances of one of the classes in getclassesN(sappends_[1]sattrssattrs isinstancestuples getclasses(sattrss getclassessattrs_[1]((s</mnt/gmirror/ports/graphics/py-PyX/work/PyX-0.10/pyx/attr.pysgetattrs9scCs—t|ƒtt||ƒƒjoqxnt|t||ƒƒD]-\}}||j otd|ƒ‚q;q;Wtd|tt||ƒƒƒ‚ndS(sœcheck whether only attributes which are instances of classes in allowedclasses are present in the attribute list attrs; if not it raises a TypeErrorsinstance %r not allowedN(slensattrssgetattrssallowedclassesszipsattr1sattr2s TypeError(sattrssallowedclassessattr2sattr1((s</mnt/gmirror/ports/graphics/py-PyX/work/PyX-0.10/pyx/attr.pys checkattrs?s"  sattrcBstZdZd„ZRS(sk attr is the base class of all attributes, i.e., colors, decorators, styles, text attributes and trafoscCs|i|ƒ|SdS(smerge self into list of attrs self may either be appended to attrs or inserted at a proper position immediately before a dependent attribute. Attributes of the same type should be removed, if redundant. Note that it is safe to modify attrs.N(sattrssappendsself(sselfsattrs((s</mnt/gmirror/ports/graphics/py-PyX/work/PyX-0.10/pyx/attr.pysmergeSs (s__name__s __module__s__doc__smerge(((s</mnt/gmirror/ports/graphics/py-PyX/work/PyX-0.10/pyx/attr.pysattrNs s exclusiveattrcBs tZdZd„Zd„ZRS(s“an attribute which swallows all but the last of the same type (specified by the exlusiveclass argument to the constructor) in an attribute listcCs ||_dS(N(sexclusiveclasssself(sselfsexclusiveclass((s</mnt/gmirror/ports/graphics/py-PyX/work/PyX-0.10/pyx/attr.pys__init__dscCsTgi}|D](}t||iƒ o||ƒqq~}|i|ƒ|SdS(N(sappends_[1]sattrssattrs isinstancesselfsexclusiveclass(sselfsattrss_[1]sattr((s</mnt/gmirror/ports/graphics/py-PyX/work/PyX-0.10/pyx/attr.pysmergegs? (s__name__s __module__s__doc__s__init__smerge(((s</mnt/gmirror/ports/graphics/py-PyX/work/PyX-0.10/pyx/attr.pys exclusiveattr_s  ssortbeforeattrcBs tZdZd„Zd„ZRS(syan attribute which places itself previous to all attributes given in the beforetheclasses argument to the constructorcCst|ƒ|_dS(N(stuplesbeforetheclassessself(sselfsbeforetheclasses((s</mnt/gmirror/ports/graphics/py-PyX/work/PyX-0.10/pyx/attr.pys__init__rscCs{d}g}xL|D]D}|ot||iƒo|i|ƒd}n|i|ƒqW|o|i|ƒn|SdS(Nii(sfirstsresultsattrssattrs isinstancesselfsbeforetheclassessappend(sselfsattrssattrsfirstsresult((s</mnt/gmirror/ports/graphics/py-PyX/work/PyX-0.10/pyx/attr.pysmergeus  (s__name__s __module__s__doc__s__init__smerge(((s</mnt/gmirror/ports/graphics/py-PyX/work/PyX-0.10/pyx/attr.pyssortbeforeattrms  ssortbeforeexclusiveattrcBs tZdZd„Zd„ZRS(san attribute which swallows all but the last of the same type (specified by the exlusiveclass argument to the constructor) in an attribute list and places itself previous to all attributes given in the beforetheclasses argument to the constructorcCs||_t|ƒ|_dS(N(sexclusiveclasssselfstuplesbeforetheclasses(sselfsexclusiveclasssbeforetheclasses((s</mnt/gmirror/ports/graphics/py-PyX/work/PyX-0.10/pyx/attr.pys__init__‰s cCs“d}g}xd|D]\}|ot||iƒo|i|ƒd}nt||iƒ o|i|ƒqqW|o|i|ƒn|SdS(Nii( sfirstsresultsattrssattrs isinstancesselfsbeforetheclassessappendsexclusiveclass(sselfsattrssattrsfirstsresult((s</mnt/gmirror/ports/graphics/py-PyX/work/PyX-0.10/pyx/attr.pysmerges  (s__name__s __module__s__doc__s__init__smerge(((s</mnt/gmirror/ports/graphics/py-PyX/work/PyX-0.10/pyx/attr.pyssortbeforeexclusiveattr‚s  s clearclasscBs tZdZd„Zd„ZRS(spa special attribute which allows to remove all predecessing attributes of the same type in an attribute listcCs ||_dS(N(s clearclasssself(sselfs clearclass((s</mnt/gmirror/ports/graphics/py-PyX/work/PyX-0.10/pyx/attr.pys__init__ scCsAgi}|D](}t||iƒ o||ƒqq~SdS(N(sappends_[1]sattrssattrs isinstancesselfs clearclass(sselfsattrss_[1]sattr((s</mnt/gmirror/ports/graphics/py-PyX/work/PyX-0.10/pyx/attr.pysmerge£s(s__name__s __module__s__doc__s__init__smerge(((s</mnt/gmirror/ports/graphics/py-PyX/work/PyX-0.10/pyx/attr.pys clearclass›s  s_clearcBstZdZd„ZRS(sVa special attribute which removes all predecessing attributes in an attribute listcCsgSdS(N((sselfsattrs((s</mnt/gmirror/ports/graphics/py-PyX/work/PyX-0.10/pyx/attr.pysmerge¬s(s__name__s __module__s__doc__smerge(((s</mnt/gmirror/ports/graphics/py-PyX/work/PyX-0.10/pyx/attr.pys_clear§s cCs‰|tjotSng}xc|D][}t|tƒo8|i||ƒ}|tjotSn|i |ƒq"|i |ƒq"W|SdS(s–performs select calls for all changeable attributes and returns the resulting attribute list - attrs should be a list containing attributes and changeable attributes - index should be an unsigned integer - total should be a positive number - valid sections fullfill 0<=index