コード例 #1
0
    def __init__(self, parent, model):
        wxID_PYTHONSOURCEDIFFVIEW = wx.NewId()

        wx.stc.StyledTextCtrl.__init__(self,
                                       parent,
                                       wxID_PYTHONSOURCEDIFFVIEW,
                                       style=wx.CLIP_CHILDREN
                                       | wx.SUNKEN_BORDER)
        PythonStyledTextCtrlMix.__init__(self, wxID_PYTHONSOURCEDIFFVIEW, 0)
        CloseableViewMix.__init__(self, _('diffs'))
        EditorView.__init__(
            self, model,
            ((_('Refresh'), self.OnRefresh, self.refreshBmp, 'Refresh'), ) +
            self.closingActionItems +
            (('-', None, '', ''),
             (_('Previous difference'), self.OnPrev, self.prevBmp, ''),
             (_('Next difference'), self.OnNext, self.nextBmp, ''),
             (_('Apply all changes'), self.OnApplyAllChanges, '-', '')), -1)

        self.SetMarginType(1, wx.stc.STC_MARGIN_SYMBOL)
        self.SetMarginWidth(1, 16)
        markIdnt, markBorder, markCenter = Preferences.STCDiffRemovedMarker
        self.MarkerDefine(uniqueFile1Mrk, markIdnt, markBorder, markCenter)
        markIdnt, markBorder, markCenter = Preferences.STCDiffAddedMarker
        self.MarkerDefine(uniqueFile2Mrk, markIdnt, markBorder, markCenter)
        markIdnt, markBorder, markCenter = Preferences.STCDiffChangesMarker
        self.MarkerDefine(newToBothMrk, markIdnt, markBorder, markCenter)

        self.SetMarginSensitive(1, True)
        wx.stc.EVT_STC_MARGINCLICK(self, wxID_PYTHONSOURCEDIFFVIEW,
                                   self.OnMarginClick)

        self.tabName = 'Diff'
        self.diffWith = ''
        self.currSearchLine = 1

        ## Install the handler for refreshs.
        if wx.Platform == '__WXGTK__' and Preferences.edUseCustomSTCPaintEvtHandler:
            self.paint_handler = Utils.PaintEventHandler(self)

        self.active = True

        self.lineIndex = []
コード例 #2
0
ファイル: MDIChild.py プロジェクト: joewan/sylphis3d
    def __init__(self, parent, id, filename, *args):
        wxStyledTextCtrl.__init__(self, id=id, parent=parent, *args)
        ##        StyledTextCtrls.CallTipCodeHelpSTCMix.__init__(self)

        ##        StyledTextCtrls.AutoCompleteCodeHelpSTCMix.__init__(self)
        self.filename = filename
        FoldingStyledTextCtrlMix.__init__(self, id, 2)

        PythonStyledTextCtrlMix.__init__(self, id, (0, 30))
        DebuggingViewSTCMix.__init__(
            self, (brkPtMrk, tmpBrkPtMrk, disabledBrkPtMrk, stepPosMrk))

        self.setupDebuggingMargin(1)  # the margin number (0 is the first)

        self.SetIndentationGuides(True)

        EVT_STC_MARGINCLICK(self, id, self.OnMarginClick)
        self.LoadFile(filename)
        self.active = True  # Investigate
コード例 #3
0
ファイル: MDIChild.py プロジェクト: harkal/sylphis3d
    def __init__(self, parent, id, filename, *args):
        wxStyledTextCtrl.__init__(self, id = id, parent = parent, *args)
##        StyledTextCtrls.CallTipCodeHelpSTCMix.__init__(self)

##        StyledTextCtrls.AutoCompleteCodeHelpSTCMix.__init__(self)
        self.filename = filename
        FoldingStyledTextCtrlMix.__init__(self, id, 2)

        PythonStyledTextCtrlMix.__init__(self, id, (0, 30))
        DebuggingViewSTCMix.__init__(self, (brkPtMrk, tmpBrkPtMrk,

              disabledBrkPtMrk, stepPosMrk))
      
        self.setupDebuggingMargin(1) # the margin number (0 is the first)
        
        self.SetIndentationGuides(True)
        
        EVT_STC_MARGINCLICK(self, id, self.OnMarginClick)
        self.LoadFile(filename)
        self.active = True # Investigate
コード例 #4
0
ファイル: DiffView.py プロジェクト: cwt/boa-constructor
    def __init__(self, parent, model):
        wxID_PYTHONSOURCEDIFFVIEW = wx.NewId()

        wx.stc.StyledTextCtrl.__init__(self, parent, wxID_PYTHONSOURCEDIFFVIEW,
          style = wx.CLIP_CHILDREN | wx.SUNKEN_BORDER)
        PythonStyledTextCtrlMix.__init__(self, wxID_PYTHONSOURCEDIFFVIEW, 0)
        CloseableViewMix.__init__(self, _('diffs'))
        EditorView.__init__(self, model,
          ( (_('Refresh'), self.OnRefresh, self.refreshBmp, 'Refresh'), ) +
            self.closingActionItems +
          ( ('-', None, '', ''),
            (_('Previous difference'), self.OnPrev, self.prevBmp, ''),
            (_('Next difference'), self.OnNext, self.nextBmp, ''),
            (_('Apply all changes'), self.OnApplyAllChanges, '-', '') ), -1)

        self.SetMarginType(1, wx.stc.STC_MARGIN_SYMBOL)
        self.SetMarginWidth(1, 16)
        markIdnt, markBorder, markCenter = Preferences.STCDiffRemovedMarker
        self.MarkerDefine(uniqueFile1Mrk, markIdnt, markBorder, markCenter)
        markIdnt, markBorder, markCenter = Preferences.STCDiffAddedMarker
        self.MarkerDefine(uniqueFile2Mrk, markIdnt, markBorder, markCenter)
        markIdnt, markBorder, markCenter = Preferences.STCDiffChangesMarker
        self.MarkerDefine(newToBothMrk, markIdnt, markBorder, markCenter)

        self.SetMarginSensitive(1, True)
        wx.stc.EVT_STC_MARGINCLICK(self, wxID_PYTHONSOURCEDIFFVIEW, self.OnMarginClick)

        self.tabName = 'Diff'
        self.diffWith = ''
        self.currSearchLine = 1

        ## Install the handler for refreshs.
        if wx.Platform == '__WXGTK__' and Preferences.edUseCustomSTCPaintEvtHandler:
            self.paint_handler = Utils.PaintEventHandler(self)

        self.active = True

        self.lineIndex = []
コード例 #5
0
 def OnUpdateUI(self, event):
     if Preferences.braceHighLight:
         PythonStyledTextCtrlMix.OnUpdateUI(self, event)