#NEWLINE# def _create_control( self , parent ) : #NEWLINE# #INDENT# ' Creates the toolkit-specific control for the widget. ' #NEWLINE# self . control = stc = PythonSTC ( parent , ( - 1 ) ) #NEWLINE# stc . SetProperty ( 'fold' , '0' ) #NEWLINE# stc . SetEdgeMode ( wx . stc . STC_EDGE_LINE ) #NEWLINE# stc . SetEdgeColumn ( 79 ) #NEWLINE# if self . show_line_numbers : #NEWLINE# #INDENT# stc . SetMarginType ( 1 , wx . stc . STC_MARGIN_NUMBER ) #NEWLINE# stc . SetMarginWidth ( 1 , 45 ) #NEWLINE# self . set_style ( wx . stc . STC_STYLE_LINENUMBER , '#000000' , '#c0c0c0' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# stc . SetMarginWidth ( 1 , 4 ) #NEWLINE# self . set_style ( wx . stc . STC_STYLE_LINENUMBER , '#ffffff' , '#ffffff' ) #NEWLINE# #UNINDENT# stc . SetUseTabs ( False ) #NEWLINE# stc . SetIndent ( 4 ) #NEWLINE# stc . SetEOLMode ( wx . stc . STC_EOL_LF ) #NEWLINE# self . set_style ( wx . stc . STC_STYLE_DEFAULT , '#000000' , '#ffffff' ) #NEWLINE# self . set_style ( wx . stc . STC_STYLE_CONTROLCHAR , '#000000' , '#ffffff' ) #NEWLINE# self . set_style ( wx . stc . STC_STYLE_BRACELIGHT , '#000000' , '#ffffff' ) #NEWLINE# self . set_style ( wx . stc . STC_STYLE_BRACEBAD , '#000000' , '#ffffff' ) #NEWLINE# self . set_style ( wx . stc . STC_P_DEFAULT , '#000000' , '#ffffff' ) #NEWLINE# self . set_style ( wx . stc . STC_P_COMMENTLINE , '#007f00' , '#ffffff' ) #NEWLINE# self . set_style ( wx . stc . STC_P_NUMBER , '#007f7f' , '#ffffff' ) #NEWLINE# self . set_style ( wx . stc . STC_P_STRING , '#7f007f' , '#ffffff' ) #NEWLINE# self . set_style ( wx . stc . STC_P_CHARACTER , '#7f007f' , '#ffffff' ) #NEWLINE# self . set_style ( wx . stc . STC_P_WORD , '#00007f' , '#ffffff' ) #NEWLINE# self . set_style ( wx . stc . STC_P_TRIPLE , '#7f0000' , '#ffffff' ) #NEWLINE# self . set_style ( wx . stc . STC_P_TRIPLEDOUBLE , '#ff0000' , '#ffffff' ) #NEWLINE# self . set_style ( wx . stc . STC_P_CLASSNAME , '#0000ff' , '#ffffff' ) #NEWLINE# self . set_style ( wx . stc . STC_P_DEFNAME , '#007f7f' , '#ffffff' ) #NEWLINE# self . set_style ( wx . stc . STC_P_OPERATOR , '#000000' , '#ffffff' ) #NEWLINE# self . set_style ( wx . stc . STC_P_IDENTIFIER , '#000000' , '#ffffff' ) #NEWLINE# self . set_style ( wx . stc . STC_P_COMMENTBLOCK , '#007f00' , '#ffffff' ) #NEWLINE# self . set_style ( wx . stc . STC_P_STRINGEOL , '#000000' , '#ffffff' ) #NEWLINE# stc . SetModEventMask ( ( ( ( wx . stc . STC_MOD_INSERTTEXT | wx . stc . STC_MOD_DELETETEXT ) | wx . stc . STC_PERFORMED_UNDO ) | wx . stc . STC_PERFORMED_REDO ) ) #NEWLINE# wx . stc . EVT_STC_CHANGE ( stc , stc . GetId ( ) , self . _on_stc_changed ) #NEWLINE# wx . EVT_CHAR ( stc , stc . _on_char ) #NEWLINE# self . load ( ) #NEWLINE# return stc