Logo Search packages:      
Sourcecode: pythoncard version File versions  Download package

def PythonCard-0.8.1::components::codeeditor::CodeEditor::_setStyles (   self,
  faces 
) [private]

Configure font size, typeface and color for lexer.

Definition at line 136 of file codeeditor.py.

00136                                :
        """Configure font size, typeface and color for lexer."""
        
        # Default style
        self.StyleSetSpec(stc.STC_STYLE_DEFAULT, "face:%(mono)s,size:%(size)d" % faces)

        self.StyleClearAll()

        # Built in styles
        self.StyleSetSpec(stc.STC_STYLE_LINENUMBER, "back:#C0C0C0,face:%(mono)s,size:%(lnsize)d" % faces)
        self.StyleSetSpec(stc.STC_STYLE_CONTROLCHAR, "face:%(mono)s" % faces)
        self.StyleSetSpec(stc.STC_STYLE_BRACELIGHT, "fore:#0000FF,back:#FFFF88")
        self.StyleSetSpec(stc.STC_STYLE_BRACEBAD, "fore:#FF0000,back:#FFFF88")

        # Python styles
        self.StyleSetSpec(stc.STC_P_DEFAULT, "face:%(mono)s" % faces)
        self.StyleSetSpec(stc.STC_P_COMMENTLINE, "fore:#007F00,face:%(mono)s" % faces)
        self.StyleSetSpec(stc.STC_P_NUMBER, "")
        self.StyleSetSpec(stc.STC_P_STRING, "fore:#7F007F,face:%(mono)s" % faces)
        self.StyleSetSpec(stc.STC_P_CHARACTER, "fore:#7F007F,face:%(mono)s" % faces)
        self.StyleSetSpec(stc.STC_P_WORD, "fore:#00007F,bold")
        self.StyleSetSpec(stc.STC_P_TRIPLE, "fore:#7F0000")
        self.StyleSetSpec(stc.STC_P_TRIPLEDOUBLE, "fore:#000033,back:#FFFFE8")
        self.StyleSetSpec(stc.STC_P_CLASSNAME, "fore:#0000FF,bold")
        self.StyleSetSpec(stc.STC_P_DEFNAME, "fore:#007F7F,bold")
        self.StyleSetSpec(stc.STC_P_OPERATOR, "")
        self.StyleSetSpec(stc.STC_P_IDENTIFIER, "")
        self.StyleSetSpec(stc.STC_P_COMMENTBLOCK, "fore:#7F7F7F")
        self.StyleSetSpec(stc.STC_P_STRINGEOL, "fore:#000000,face:%(mono)s,back:#E0C0E0,eolfilled" % faces)

        configfile = configuration.getStyleConfigPath()
        if os.path.exists(configfile):
            STCStyleEditor.initSTC(self, configfile, 'python')

    def _getLineNumbersVisible(self):


Generated by  Doxygen 1.6.0   Back to index