rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
EVT_BUTTON(self.okBtn, wxID_STCSTYLEEDITDLGOKBTN, self.OnOkbtnButton) self.cancelBtn = wxButton(id=wxID_STCSTYLEEDITDLGCANCELBTN, label='Cancel', name='cancelBtn', parent=self, pos=wxPoint(366, 423), size=wxSize(75, 23), style=0) | self.okBtn.Bind(wx.EVT_BUTTON, self.OnOkbtnButton, id=wxID_STCSTYLEEDITDLGOKBTN) self.cancelBtn = wx.Button(id=wxID_STCSTYLEEDITDLGCANCELBTN, label='Cancel', name='cancelBtn', parent=self, pos=wx.Point(400, 423), size=wx.Size(75, 23), style=0) | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSi... |
EVT_BUTTON(self.cancelBtn, wxID_STCSTYLEEDITDLGCANCELBTN, self.OnCancelbtnButton) self.staticText4 = wxStaticText(id=wxID_STCSTYLEEDITDLGSTATICTEXT4, | self.cancelBtn.Bind(wx.EVT_BUTTON, self.OnCancelbtnButton, id=wxID_STCSTYLEEDITDLGCANCELBTN) self.staticText4 = wx.StaticText(id=wxID_STCSTYLEEDITDLGSTATICTEXT4, | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSi... |
pos=wxPoint(0, 0), size=wxSize(48, 13), style=0) self.fixedWidthChk = wxCheckBox(id=wxID_STCSTYLEEDITDLGFIXEDWIDTHCHK, label='', name='fixedWidthChk', parent=self.panel1, pos=wxPoint(0, 23), size=wxSize(13, 19), style=0) | pos=wx.Point(0, 0), size=wx.Size(48, 13), style=0) self.fixedWidthChk = wx.CheckBox(id=wxID_STCSTYLEEDITDLGFIXEDWIDTHCHK, label='', name='fixedWidthChk', parent=self.panel1, pos=wx.Point(0, 23), size=wx.Size(16, 19), style=0) | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSi... |
EVT_CHECKBOX(self.fixedWidthChk, wxID_STCSTYLEEDITDLGFIXEDWIDTHCHK, self.OnFixedwidthchkCheckbox) self.faceCb = wxComboBox(choices=[], id=wxID_STCSTYLEEDITDLGFACECB, name='faceCb', parent=self.panel1, pos=wxPoint(17, 18), size=wxSize(105, 21), style=0, validator=wxDefaultValidator, value='') self.staticText7 = wxStat... | self.fixedWidthChk.Bind(wx.EVT_CHECKBOX, self.OnFixedwidthchkCheckbox, id=wxID_STCSTYLEEDITDLGFIXEDWIDTHCHK) self.faceCb = wx.ComboBox(choices=[], id=wxID_STCSTYLEEDITDLGFACECB, name='faceCb', parent=self.panel1, pos=wx.Point(17, 18), size=wx.Size(101, 21), style=0, value='') self.staticText7 = wx.StaticText(id=wxID_... | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSi... |
pos=wxPoint(0, 0), size=wxSize(40, 13), style=0) self.sizeCb = wxComboBox(choices=[], id=wxID_STCSTYLEEDITDLGSIZECB, name='sizeCb', parent=self.panel2, pos=wxPoint(0, 17), size=wxSize(91, 21), style=0, validator=wxDefaultValidator, value='') self.sizeOkBtn = wxButton(id=wxID_STCSTYLEEDITDLGSIZEOKBTN, label='ok', name... | pos=wx.Point(0, 0), size=wx.Size(40, 13), style=0) self.sizeCb = wx.ComboBox(choices=[], id=wxID_STCSTYLEEDITDLGSIZECB, name='sizeCb', parent=self.panel2, pos=wx.Point(0, 17), size=wx.Size(80, 21), style=0, value='') self.sizeOkBtn = wx.Button(id=wxID_STCSTYLEEDITDLGSIZEOKBTN, label='ok', name='sizeOkBtn', parent=sel... | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSi... |
pos=wxPoint(8, 16), size=wxSize(72, 16), style=0) EVT_BUTTON(self.fgColBtn, wxID_STCSTYLEEDITDLGFGCOLBTN, self.OnFgcolbtnButton) self.fgColCb = wxComboBox(choices=[], id=wxID_STCSTYLEEDITDLGFGCOLCB, name='fgColCb', parent=self.panel3, pos=wxPoint(8, 32), size=wxSize(89, 21), style=0, validator=wxDefaultValidator, valu... | pos=wx.Point(8, 16), size=wx.Size(96, 16), style=0) self.fgColBtn.Bind(wx.EVT_BUTTON, self.OnFgcolbtnButton, id=wxID_STCSTYLEEDITDLGFGCOLBTN) self.fgColCb = wx.ComboBox(choices=[], id=wxID_STCSTYLEEDITDLGFGCOLCB, name='fgColCb', parent=self.panel3, pos=wx.Point(8, 32), size=wx.Size(96, 21), style=0, value='') self.fg... | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSi... |
pos=wxPoint(100, 16), size=wxSize(37, 16), style=0) self.fgColDefCb = wxCheckBox(id=wxID_STCSTYLEEDITDLGFGCOLDEFCB, | pos=wx.Point(112, 15), size=wx.Size(38, 16), style=0) self.fgColDefCb = wx.CheckBox(id=wxID_STCSTYLEEDITDLGFGCOLDEFCB, | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSi... |
pos=wxPoint(120, 31), size=wxSize(16, 16), style=0) self.bgColBtn = wxButton(id=wxID_STCSTYLEEDITDLGBGCOLBTN, | pos=wx.Point(136, 31), size=wx.Size(16, 16), style=0) self.bgColBtn = wx.Button(id=wxID_STCSTYLEEDITDLGBGCOLBTN, | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSi... |
pos=wxPoint(8, 56), size=wxSize(72, 16), style=0) EVT_BUTTON(self.bgColBtn, wxID_STCSTYLEEDITDLGBGCOLBTN, self.OnBgcolbtnButton) self.bgColCb = wxComboBox(choices=[], id=wxID_STCSTYLEEDITDLGBGCOLCB, name='bgColCb', parent=self.panel3, pos=wxPoint(8, 72), size=wxSize(89, 21), style=0, validator=wxDefaultValidator, valu... | pos=wx.Point(8, 64), size=wx.Size(96, 16), style=0) self.bgColBtn.Bind(wx.EVT_BUTTON, self.OnBgcolbtnButton, id=wxID_STCSTYLEEDITDLGBGCOLBTN) self.bgColCb = wx.ComboBox(choices=[], id=wxID_STCSTYLEEDITDLGBGCOLCB, name='bgColCb', parent=self.panel3, pos=wx.Point(8, 80), size=wx.Size(96, 21), style=0, value='') self.bg... | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSi... |
pos=wxPoint(0, 0), size=wxSize(112, 99), style=0) | pos=wx.Point(0, 0), size=wx.Size(112, 112), style=0) | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSi... |
self.staticText2 = wxStaticText(id=wxID_STCSTYLEEDITDLGSTATICTEXT2, | self.staticText2 = wx.StaticText(id=wxID_STCSTYLEEDITDLGSTATICTEXT2, | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSi... |
pos=wxPoint(68, 11), size=wxSize(37, 16), style=0) self.taBoldDefCb = wxCheckBox(id=wxID_STCSTYLEEDITDLGTABOLDDEFCB, | pos=wx.Point(64, 12), size=wx.Size(40, 16), style=0) self.taBoldDefCb = wx.CheckBox(id=wxID_STCSTYLEEDITDLGTABOLDDEFCB, | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSi... |
pos=wxPoint(88, 27), size=wxSize(16, 16), style=0) self.taItalicDefCb = wxCheckBox(id=wxID_STCSTYLEEDITDLGTAITALICDEFCB, | pos=wx.Point(88, 27), size=wx.Size(16, 16), style=0) self.taItalicDefCb = wx.CheckBox(id=wxID_STCSTYLEEDITDLGTAITALICDEFCB, | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSi... |
pos=wxPoint(88, 43), size=wxSize(16, 16), style=0) self.taUnderlinedDefCb = wxCheckBox(id=wxID_STCSTYLEEDITDLGTAUNDERLINEDDEFCB, | pos=wx.Point(88, 48), size=wx.Size(16, 16), style=0) self.taUnderlinedDefCb = wx.CheckBox(id=wxID_STCSTYLEEDITDLGTAUNDERLINEDDEFCB, | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSi... |
pos=wxPoint(88, 59), size=wxSize(16, 16), style=0) self.taEOLfilledDefCb = wxCheckBox(id=wxID_STCSTYLEEDITDLGTAEOLFILLEDDEFCB, | pos=wx.Point(88, 70), size=wx.Size(16, 16), style=0) self.taEOLfilledDefCb = wx.CheckBox(id=wxID_STCSTYLEEDITDLGTAEOLFILLEDDEFCB, | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSi... |
pos=wxPoint(88, 75), size=wxSize(16, 16), style=0) self.taEOLfilledCb = wxCheckBox(id=wxID_STCSTYLEEDITDLGTAEOLFILLEDCB, | pos=wx.Point(88, 92), size=wx.Size(16, 16), style=0) self.taEOLfilledCb = wx.CheckBox(id=wxID_STCSTYLEEDITDLGTAEOLFILLEDCB, | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSi... |
pos=wxPoint(8, 75), size=wxSize(72, 16), style=0) EVT_CHECKBOX(self.taEOLfilledCb, wxID_STCSTYLEEDITDLGTAEOLFILLEDCB, self.OnTaeoffilledcbCheckbox) self.taUnderlinedCb = wxCheckBox(id=wxID_STCSTYLEEDITDLGTAUNDERLINEDCB, | pos=wx.Point(8, 92), size=wx.Size(80, 16), style=0) self.taEOLfilledCb.Bind(wx.EVT_CHECKBOX, self.OnTaeoffilledcbCheckbox, id=wxID_STCSTYLEEDITDLGTAEOLFILLEDCB) self.taUnderlinedCb = wx.CheckBox(id=wxID_STCSTYLEEDITDLGTAUNDERLINEDCB, | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSi... |
pos=wxPoint(8, 59), size=wxSize(72, 16), style=0) EVT_CHECKBOX(self.taUnderlinedCb, wxID_STCSTYLEEDITDLGTAUNDERLINEDCB, self.OnTaunderlinedcbCheckbox) self.taItalicCb = wxCheckBox(id=wxID_STCSTYLEEDITDLGTAITALICCB, | pos=wx.Point(8, 70), size=wx.Size(80, 16), style=0) self.taUnderlinedCb.Bind(wx.EVT_CHECKBOX, self.OnTaunderlinedcbCheckbox, id=wxID_STCSTYLEEDITDLGTAUNDERLINEDCB) self.taItalicCb = wx.CheckBox(id=wxID_STCSTYLEEDITDLGTAITALICCB, | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSi... |
pos=wxPoint(8, 43), size=wxSize(72, 16), style=0) EVT_CHECKBOX(self.taItalicCb, wxID_STCSTYLEEDITDLGTAITALICCB, self.OnTaitaliccbCheckbox) self.taBoldCb = wxCheckBox(id=wxID_STCSTYLEEDITDLGTABOLDCB, label='Bold', name='taBoldCb', parent=self.panel4, pos=wxPoint(8, 27), size=wxSize(72, 16), style=0) EVT_CHECKBOX(self.t... | pos=wx.Point(8, 48), size=wx.Size(80, 16), style=0) self.taItalicCb.Bind(wx.EVT_CHECKBOX, self.OnTaitaliccbCheckbox, id=wxID_STCSTYLEEDITDLGTAITALICCB) self.taBoldCb = wx.CheckBox(id=wxID_STCSTYLEEDITDLGTABOLDCB, label='Bold', name='taBoldCb', parent=self.panel4, pos=wx.Point(8, 27), size=wx.Size(80, 16), style=0) sel... | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSi... |
pos=wxPoint(120, 71), size=wxSize(16, 16), style=0) self.staticBox1 = wxStaticBox(id=wxID_STCSTYLEEDITDLGSTATICBOX1, | pos=wx.Point(136, 79), size=wx.Size(16, 16), style=0) self.staticBox1 = wx.StaticBox(id=wxID_STCSTYLEEDITDLGSTATICBOX1, | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSi... |
pos=wxPoint(0, 0), size=wxSize(142, 99), style=0) | pos=wx.Point(0, 0), size=wx.Size(157, 112), style=0) | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSi... |
self.faceDefCb = wxCheckBox(id=wxID_STCSTYLEEDITDLGFACEDEFCB, | self.faceDefCb = wx.CheckBox(id=wxID_STCSTYLEEDITDLGFACEDEFCB, | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSi... |
pos=wxPoint(120, 0), size=wxSize(16, 16), style=0) self.taSizeDefCb = wxCheckBox(id=wxID_STCSTYLEEDITDLGTASIZEDEFCB, | pos=wx.Point(117, 0), size=wx.Size(16, 16), style=0) self.taSizeDefCb = wx.CheckBox(id=wxID_STCSTYLEEDITDLGTASIZEDEFCB, | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSi... |
pos=wxPoint(88, 0), size=wxSize(16, 16), style=0) | pos=wx.Point(80, 0), size=wx.Size(16, 16), style=0) | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSi... |
global commonPropDefs commonPropDefs = {'fore': ' 'size': 8, 'face': wxSystemSettings_GetSystemFont(wxSYS_DEFAULT_GUI_FONT).GetFaceName()} | def __init__(self, parent, langTitle, lang, configFile, STCsToUpdate=()): global commonPropDefs commonPropDefs = {'fore': '#888888', 'size': 8, 'face': wxSystemSettings_GetSystemFont(wxSYS_DEFAULT_GUI_FONT).GetFaceName()} | |
if wxPlatform == '__WXMSW__': self.style_font_size = 8 else: self.style_font_size = 10 | self.style_font_size = 8 self.style_font_size = platformSettings[wx.Platform][1] | def __init__(self, parent, langTitle, lang, configFile, STCsToUpdate=()): global commonPropDefs commonPropDefs = {'fore': '#888888', 'size': 8, 'face': wxSystemSettings_GetSystemFont(wxSYS_DEFAULT_GUI_FONT).GetFaceName()} |
global commonPropDefs commonPropDefs = {'fore': ' 'face': wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT).GetFaceName()} | def __init__(self, parent, langTitle, lang, configFile, STCsToUpdate=()): global commonPropDefs commonPropDefs = {'fore': '#888888', 'size': 8, 'face': wxSystemSettings_GetSystemFont(wxSYS_DEFAULT_GUI_FONT).GetFaceName()} | |
self.stc.SetMarginType(margin, wxSTC_MARGIN_NUMBER) | self.stc.SetMarginType(margin, wx.stc.STC_MARGIN_NUMBER) | def __init__(self, parent, langTitle, lang, configFile, STCsToUpdate=()): global commonPropDefs commonPropDefs = {'fore': '#888888', 'size': 8, 'face': wxSystemSettings_GetSystemFont(wxSYS_DEFAULT_GUI_FONT).GetFaceName()} |
EVT_STC_MARGINCLICK(self.stc, wxID_STCSTYLEEDITDLGSTC, self.OnMarginClick) | self.stc.Bind(wx.stc.EVT_STC_MARGINCLICK, self.OnMarginClick, id=wxID_STCSTYLEEDITDLGSTC) | def __init__(self, parent, langTitle, lang, configFile, STCsToUpdate=()): global commonPropDefs commonPropDefs = {'fore': '#888888', 'size': 8, 'face': wxSystemSettings_GetSystemFont(wxSYS_DEFAULT_GUI_FONT).GetFaceName()} |
self.stc.SetEdgeMode(wxSTC_EDGE_BACKGROUND) | self.stc.SetEdgeMode(wx.stc.STC_EDGE_BACKGROUND) | def __init__(self, parent, langTitle, lang, configFile, STCsToUpdate=()): global commonPropDefs commonPropDefs = {'fore': '#888888', 'size': 8, 'face': wxSystemSettings_GetSystemFont(wxSYS_DEFAULT_GUI_FONT).GetFaceName()} |
self.styleDict.get(wxSTC_STYLE_DEFAULT, '')) | self.styleDict.get(wx.stc.STC_STYLE_DEFAULT, '')) | def __init__(self, parent, langTitle, lang, configFile, STCsToUpdate=()): global commonPropDefs commonPropDefs = {'fore': '#888888', 'size': 8, 'face': wxSystemSettings_GetSystemFont(wxSYS_DEFAULT_GUI_FONT).GetFaceName()} |
EVT_CHECKBOX(chb, wid, self.OnDefaultCheckBox) | chb.Bind(wx.EVT_CHECKBOX, self.OnDefaultCheckBox, id=wid) | def __init__(self, parent, langTitle, lang, configFile, STCsToUpdate=()): global commonPropDefs commonPropDefs = {'fore': '#888888', 'size': 8, 'face': wxSystemSettings_GetSystemFont(wxSYS_DEFAULT_GUI_FONT).GetFaceName()} |
self.Center(wxBOTH) | self.Center(wx.BOTH) | def __init__(self, parent, langTitle, lang, configFile, STCsToUpdate=()): global commonPropDefs commonPropDefs = {'fore': '#888888', 'size': 8, 'face': wxSystemSettings_GetSystemFont(wxSYS_DEFAULT_GUI_FONT).GetFaceName()} |
wxLogError('Name not found in Common definition, '\ | wx.LogError('Name not found in Common definition, '\ | def editProp(self, on, prop, val=''): oldstyle = self.rememberStyles() if on: if not self.names.count(prop): self.names.append(prop) self.values[prop] = val else: try: self.names.remove(prop) except ValueError: pass try: del self.values[prop] except KeyError: pass |
if string.find(style, txt) != -1: | if style.find(txt) != -1: | def findInStyles(self, txt, styles): for style in styles: if string.find(style, txt) != -1: return True return False |
wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNFACE)) cbtn.SetForegroundColour(wxColour(255, 255, 255)) | wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNFACE)) cbtn.SetForegroundColour(wx.Colour(255, 255, 255)) | def clearCtrls(self, isDefault=False, disableDefs=False): self._blockUpdate = True try: for ctrl, chb, prop, wid in self.allCtrls: if prop in ('fore', 'back'): cbtn, txt, btn = ctrl cbtn.SetBackgroundColour(\ wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNFACE)) cbtn.SetForegroundColour(wxColour(255, 255, 255)) cbtn.... |
cbtn.SetForegroundColour(wxColour(0, 0, 0)) | cbtn.SetForegroundColour(wx.Colour(0, 0, 0)) | def populateProp(self, items, default, forceDisable=False): self._blockUpdate = True try: for name, val in items: if name: ctrl, chb = self.getCtrlForProp(name) |
self.clearCtrls(self.styleNum == wxSTC_STYLE_DEFAULT, | self.clearCtrls(self.styleNum == wx.stc.STC_STYLE_DEFAULT, | def populateCtrls(self): self.clearCtrls(self.styleNum == wxSTC_STYLE_DEFAULT, disableDefs=self.styleNum < 0) |
self.styleNum != wxSTC_STYLE_DEFAULT) | self.styleNum != wx.stc.STC_STYLE_DEFAULT) | def populateCtrls(self): self.clearCtrls(self.styleNum == wxSTC_STYLE_DEFAULT, disableDefs=self.styleNum < 0) |
EVT_COMBOBOX(combo, combo.GetId(), comboEvtMeth) EVT_BUTTON(btn, btn.GetId(), btnEvtMeth) EVT_RIGHT_DCLICK(combo, rdclickEvtMeth) | combo.Bind(wx.EVT_COMBOBOX, comboEvtMeth, id=combo.GetId()) btn.Bind(wx.EVT_BUTTON, btnEvtMeth, id=btn.GetId()) combo.Bind(wx.EVT_RIGHT_DCLICK, rdclickEvtMeth) | def bindComboEvts(self, combo, btn, btnEvtMeth, comboEvtMeth, rdclickEvtMeth): EVT_COMBOBOX(combo, combo.GetId(), comboEvtMeth) EVT_BUTTON(btn, btn.GetId(), btnEvtMeth) EVT_RIGHT_DCLICK(combo, rdclickEvtMeth) combo.SetToolTipString('Select from list or click "ok" button on the right to change a manual entry, right doub... |
fontEnum = wxFontEnumerator() | fontEnum = wx.FontEnumerator() | def populateCombosWithCommonDefs(self, fixedWidthOnly=None): self._blockUpdate = True try: commonDefs = {'fore': [], 'face': [], 'size': []} |
for colCommonDef in ['']+fontNameList+commonDefs['face']: | for colCommonDef in fontNameList+commonDefs['face']: | def populateCombosWithCommonDefs(self, fixedWidthOnly=None): self._blockUpdate = True try: commonDefs = {'fore': [], 'face': [], 'size': []} |
if num == wxSTC_STYLE_DEFAULT: | if num == wx.stc.STC_STYLE_DEFAULT: | def populateStyleSelector(self): numStyles = self.styleIdNames.items() numStyles.sort() self.styleNumLookup = {} stdStart = -1 stdOffset = 0 extrOffset = 0 # add styles for num, name in numStyles: if num == wxSTC_STYLE_DEFAULT: self.elementLb.InsertItems([name, '----Language----'], 0) self.elementLb.Append('----Standar... |
data = wxColourData() | data = wx.ColourData() | def getColourDlg(self, colour, title=''): data = wxColourData() data.SetColour(colour) data.SetChooseFull(True) dlg = wxColourDialog(self, data) try: dlg.SetTitle(title) if dlg.ShowModal() == wxID_OK: data = dlg.GetColourData() return data.GetColour() finally: dlg.Destroy() return None |
dlg = wxColourDialog(self, data) | dlg = wx.ColourDialog(self, data) | def getColourDlg(self, colour, title=''): data = wxColourData() data.SetColour(colour) data.SetChooseFull(True) dlg = wxColourDialog(self, data) try: dlg.SetTitle(title) if dlg.ShowModal() == wxID_OK: data = dlg.GetColourData() return data.GetColour() finally: dlg.Destroy() return None |
if dlg.ShowModal() == wxID_OK: | if dlg.ShowModal() == wx.ID_OK: | def getColourDlg(self, colour, title=''): data = wxColourData() data.SetColour(colour) data.SetChooseFull(True) dlg = wxColourDialog(self, data) try: dlg.SetTitle(title) if dlg.ShowModal() == wxID_OK: data = dlg.GetColourData() return data.GetColour() finally: dlg.Destroy() return None |
colBtn.SetForegroundColour(wxColour(0, 0, 0)) | colBtn.SetForegroundColour(wx.Colour(0, 0, 0)) | def editColProp(self, colBtn, colCb, prop): col = self.getColourDlg(colBtn.GetBackgroundColour(), self.colDlgTitles[prop]+ ' colour') if col: colBtn.SetForegroundColour(wxColour(0, 0, 0)) colBtn.SetBackgroundColour(col) colStr = colToStr(col) colCb.SetValue(colStr) self.editProp(True, prop, colStr) |
colBtn.SetForegroundColour(wxColour(0, 0, 0)) | colBtn.SetForegroundColour(wx.Colour(0, 0, 0)) | def editColTCProp(self, colCb, colBtn, prop, val=None): if val is None: colStr = colCb.GetValue() else: colStr = val if colStr: col = strToCol(colStr%self.commonDefs) if self.editProp(colStr!='', prop, colStr): if colStr: colBtn.SetForegroundColour(wxColour(0, 0, 0)) colBtn.SetBackgroundColour(col) else: colBtn.SetFore... |
colBtn.SetForegroundColour(wxColour(255, 255, 255)) | colBtn.SetForegroundColour(wx.Colour(255, 255, 255)) | def editColTCProp(self, colCb, colBtn, prop, val=None): if val is None: colStr = colCb.GetValue() else: colStr = val if colStr: col = strToCol(colStr%self.commonDefs) if self.editProp(colStr!='', prop, colStr): if colStr: colBtn.SetForegroundColour(wxColour(0, 0, 0)) colBtn.SetBackgroundColour(col) else: colBtn.SetFore... |
wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNFACE)) | wxSystemSettings.GetColour(wx.SYS_COLOUR_BTNFACE)) | def editColTCProp(self, colCb, colBtn, prop, val=None): if val is None: colStr = colCb.GetValue() else: colStr = val if colStr: col = strToCol(colStr%self.commonDefs) if self.editProp(colStr!='', prop, colStr): if colStr: colBtn.SetForegroundColour(wxColour(0, 0, 0)) colBtn.SetBackgroundColour(col) else: colBtn.SetFore... |
except AssertionError: wxLogError('Not a valid colour value') | except AssertionError: wx.LogError('Not a valid colour value') | def OnfgColRet(self, event): try: self.editColTCProp(self.fgColCb, self.fgColBtn, 'fore') except AssertionError: wxLogError('Not a valid colour value') |
except AssertionError: wxLogError('Not a valid colour value') | except AssertionError: wx.LogError('Not a valid colour value') | def OnfgColCombobox(self, event): if self._blockUpdate: return try: self.editColTCProp(self.fgColCb, self.fgColBtn, 'fore', event.GetString()) except AssertionError: wxLogError('Not a valid colour value') |
except AssertionError: wxLogError('Not a valid colour value') | except AssertionError: wx.LogError('Not a valid colour value') | def OnbgColRet(self, event): try: self.editColTCProp(self.bgColCb, self.bgColBtn, 'back') except AssertionError: wxLogError('Not a valid colour value') |
except AssertionError: wxLogError('Not a valid colour value') | except AssertionError: wx.LogError('Not a valid colour value') | def OnbgColCombobox(self, event): if self._blockUpdate: return try: self.editColTCProp(self.bgColCb, self.bgColBtn, 'back', event.GetString()) except AssertionError: wxLogError('Not a valid colour value') |
except KeyError: wxLogError('Invalid common definition') | except KeyError: wx.LogError('Invalid common definition') | def setFace(self, val): try: val%self.commonDefs except KeyError: wxLogError('Invalid common definition') else: self.editProp(val!='', 'face', val) |
except ValueError: wxLogError('Not a valid integer size value') except KeyError: wxLogError('Invalid common definition') | except ValueError: wx.LogError('Not a valid integer size value') except KeyError: wx.LogError('Invalid common definition') | def setSize(self, val): try: int(val%self.commonDefs) except ValueError: wxLogError('Not a valid integer size value') except KeyError: wxLogError('Invalid common definition') else: self.editProp(val!='', 'size', val) |
if self.styleNum == wxSTC_STYLE_DEFAULT: | if self.styleNum == wx.stc.STC_STYLE_DEFAULT: | def OnElementlbListbox(self, event): isCommon = self.elementLb.GetSelection() >= self.commonDefsStartIdx self.removeCommonItemBtn.Enable(isCommon) |
wxBeginBusyCursor() | wx.BeginBusyCursor() | def OnOkbtnButton(self, event): # write styles and common defs to the config wxBeginBusyCursor() try: writeStylesToConfig(self.config, 'style.%s'%self.lang, self.styles) self.config.SetPath('') self.config.Write(commonDefsFile, `self.commonDefs`) self.config.Flush() |
wxEndBusyCursor() self.EndModal(wxID_OK) | wx.EndBusyCursor() self.EndModal(wx.ID_OK) | def OnOkbtnButton(self, event): # write styles and common defs to the config wxBeginBusyCursor() try: writeStylesToConfig(self.config, 'style.%s'%self.lang, self.styles) self.config.SetPath('') self.config.Write(commonDefsFile, `self.commonDefs`) self.config.Flush() |
self.EndModal(wxID_CANCEL) | self.EndModal(wx.ID_CANCEL) | def OnCancelbtnButton(self, event): self.EndModal(wxID_CANCEL) |
dlg = wxTextEntryDialog(self, 'Edit common definitions dictionary', | dlg = wx.TextEntryDialog(self, 'Edit common definitions dictionary', | def OnCommondefsbtnButton(self, event): dlg = wxTextEntryDialog(self, 'Edit common definitions dictionary', 'Common definitions', pprint.pformat(self.commonDefs), style=wxTE_MULTILINE | wxOK | wxCANCEL | wxCENTRE) try: if dlg.ShowModal() == wxID_OK: answer = eval(dlg.GetValue()) assert type(answer) is type({}), 'Not a ... |
style=wxTE_MULTILINE | wxOK | wxCANCEL | wxCENTRE) | style=wx.TE_MULTILINE | wx.OK | wx.CANCEL | wx.CENTRE) | def OnCommondefsbtnButton(self, event): dlg = wxTextEntryDialog(self, 'Edit common definitions dictionary', 'Common definitions', pprint.pformat(self.commonDefs), style=wxTE_MULTILINE | wxOK | wxCANCEL | wxCENTRE) try: if dlg.ShowModal() == wxID_OK: answer = eval(dlg.GetValue()) assert type(answer) is type({}), 'Not a ... |
if dlg.ShowModal() == wxID_OK: answer = eval(dlg.GetValue()) | if dlg.ShowModal() == wx.ID_OK: answer = eval(dlg.GetValue(), stc.__dict__) | def OnCommondefsbtnButton(self, event): dlg = wxTextEntryDialog(self, 'Edit common definitions dictionary', 'Common definitions', pprint.pformat(self.commonDefs), style=wxTE_MULTILINE | wxOK | wxCANCEL | wxCENTRE) try: if dlg.ShowModal() == wxID_OK: answer = eval(dlg.GetValue()) assert type(answer) is type({}), 'Not a ... |
wxLogError(str(badkey)+' not defined but required, \n'\ | wx.LogError(str(badkey)+' not defined but required, \n'\ | def OnCommondefsbtnButton(self, event): dlg = wxTextEntryDialog(self, 'Edit common definitions dictionary', 'Common definitions', pprint.pformat(self.commonDefs), style=wxTE_MULTILINE | wxOK | wxCANCEL | wxCENTRE) try: if dlg.ShowModal() == wxID_OK: answer = eval(dlg.GetValue()) assert type(answer) is type({}), 'Not a ... |
self.styleDict.get(wxSTC_STYLE_DEFAULT, '')) | self.styleDict.get(wx.stc.STC_STYLE_DEFAULT, '')) | def OnSpeedsettingchChoice(self, event): group = event.GetString() if group: userStyles = 'style.%s'%self.lang if self.currSpeedSetting == userStyles: self.predefStyleGroups[userStyles] = self.styles self.styles = self.predefStyleGroups[group] self.setStyles() self.defNames, self.defValues = parseProp(\ self.styleDict.... |
self.populateCombosWithCommonDefs(event.Checked()) | self.populateCombosWithCommonDefs(event.IsChecked()) | def OnFixedwidthchkCheckbox(self, event): self.populateCombosWithCommonDefs(event.Checked()) |
if dlg.ShowModal() == wxID_OK: | if dlg.ShowModal() == wx.ID_OK: | def OnAddsharebtnButton(self, event): dlg = CommonDefDlg(self) try: if dlg.ShowModal() == wxID_OK: prop, name = dlg.result if not self.commonDefs.has_key(name): self.commonDefs[name] = commonPropDefs[prop] self.elementLb.Append('%('+name+')'+\ (type(commonPropDefs[prop]) is type('') and 's' or 'd')) self.elementLb.SetS... |
wxLogError('Aborted: '+comDef+' is still used in the styles of the \n'\ | wx.LogError('Aborted: '+comDef+' is still used in the styles of the \n'\ | def OnRemovesharebtnButton(self, event): ownGroup = 'style.%s'%self.lang comDef = self.elementLb.GetStringSelection() |
string.join(matchList, '\n')) | '\n'.join(matchList)) | def OnRemovesharebtnButton(self, event): ownGroup = 'style.%s'%self.lang comDef = self.elementLb.GetStringSelection() |
if style == wxSTC_STYLE_BRACELIGHT and self.braceInfo.has_key('good'): | if style == wx.stc.STC_STYLE_BRACELIGHT and self.braceInfo.has_key('good'): | def checkBraces(self, style): if style == wxSTC_STYLE_BRACELIGHT and self.braceInfo.has_key('good'): line, col = self.braceInfo['good'] pos = self.stc.PositionFromLine(line-1) + col braceOpposite = self.stc.BraceMatch(pos) if braceOpposite != -1: self.stc.BraceHighlight(pos, braceOpposite) elif style == wxSTC_STYLE_BRA... |
elif style == wxSTC_STYLE_BRACEBAD and self.braceInfo.has_key('bad'): | elif style == wx.stc.STC_STYLE_BRACEBAD and self.braceInfo.has_key('bad'): | def checkBraces(self, style): if style == wxSTC_STYLE_BRACELIGHT and self.braceInfo.has_key('good'): line, col = self.braceInfo['good'] pos = self.stc.PositionFromLine(line-1) + col braceOpposite = self.stc.BraceMatch(pos) if braceOpposite != -1: self.stc.BraceHighlight(pos, braceOpposite) elif style == wxSTC_STYLE_BRA... |
[wxID_COMMONDEFDLG, wxID_COMMONDEFDLGCANCELBTN, wxID_COMMONDEFDLGCOMDEFNAMETC, wxID_COMMONDEFDLGOKBTN, wxID_COMMONDEFDLGPROPTYPERBX, wxID_COMMONDEFDLGSTATICBOX1] = map(lambda _init_ctrls: wxNewId(), range(6)) class CommonDefDlg(wxDialog): | [wxID_COMMONDEFDLG, wxID_COMMONDEFDLGCANCELBTN, wxID_COMMONDEFDLGCOMDEFNAMETC, wxID_COMMONDEFDLGOKBTN, wxID_COMMONDEFDLGPROPTYPERBX, wxID_COMMONDEFDLGSTATICBOX1] = [wx.NewId() for _init_ctrls in range(6)] class CommonDefDlg(wx.Dialog): | def OnMarginClick(self, event): self.elementLb.SetStringSelection('Line numbers', True) self.OnElementlbListbox(None) |
wxDialog.__init__(self, id = wxID_COMMONDEFDLG, name = 'CommonDefDlg', parent = prnt, pos = wxPoint(398, 249), size = wxSize(192, 220), style = wxDEFAULT_DIALOG_STYLE, title = 'Common definition') self.SetClientSize(wxSize(184, 200)) self.propTypeRBx = wxRadioBox(choices = ['Colour value', 'Font face', 'Size value'], ... | wx.Dialog.__init__(self, id = wxID_COMMONDEFDLG, name = 'CommonDefDlg', parent = prnt, pos = wx.Point(398, 249), size = wx.Size(192, 220), style= wx.DEFAULT_DIALOG_STYLE, title = 'Common definition') self.SetClientSize(wx.Size(184, 200)) self.propTypeRBx = wx.RadioBox(choices = ['Colour value', 'Font face', 'Size valu... | def _init_ctrls(self, prnt): wxDialog.__init__(self, id = wxID_COMMONDEFDLG, name = 'CommonDefDlg', parent = prnt, pos = wxPoint(398, 249), size = wxSize(192, 220), style = wxDEFAULT_DIALOG_STYLE, title = 'Common definition') self.SetClientSize(wxSize(184, 200)) |
self.staticBox1 = wxStaticBox(id = wxID_COMMONDEFDLGSTATICBOX1, label = 'Name', name = 'staticBox1', parent = self, pos = wxPoint(8, 108), size = wxSize(168, 46), style = 0) self.comDefNameTC = wxTextCtrl(id = wxID_COMMONDEFDLGCOMDEFNAMETC, name = 'comDefNameTC', parent = self, pos = wxPoint(16, 124), size = wxSize(15... | self.staticBox1 = wx.StaticBox(id = wxID_COMMONDEFDLGSTATICBOX1, label = 'Name', name = 'staticBox1', parent = self, pos = wx.Point(8, 108), size = wx.Size(168, 46), style = 0) self.comDefNameTC = wx.TextCtrl(id = wxID_COMMONDEFDLGCOMDEFNAMETC, name = 'comDefNameTC', parent = self, pos = wx.Point(16, 124), size = wx.S... | def _init_ctrls(self, prnt): wxDialog.__init__(self, id = wxID_COMMONDEFDLG, name = 'CommonDefDlg', parent = prnt, pos = wxPoint(398, 249), size = wxSize(192, 220), style = wxDEFAULT_DIALOG_STYLE, title = 'Common definition') self.SetClientSize(wxSize(184, 200)) |
self.okBtn = wxButton(id = wxID_COMMONDEFDLGOKBTN, label = 'OK', name = 'okBtn', parent = self, pos = wxPoint(8, 164), size = wxSize(80, 23), style = 0) EVT_BUTTON(self.okBtn, wxID_COMMONDEFDLGOKBTN, self.OnOkbtnButton) self.cancelBtn = wxButton(id = wxID_COMMONDEFDLGCANCELBTN, label = 'Cancel', name = 'cancelBtn', pa... | self.okBtn = wx.Button(id = wxID_COMMONDEFDLGOKBTN, label = 'OK', name = 'okBtn', parent = self, pos = wx.Point(8, 164), size = wx.Size(80, 23), style = 0) self.okBtn.Bind(wx.EVT_BUTTON, self.OnOkbtnButton, id=wxID_COMMONDEFDLGOKBTN) self.cancelBtn = wx.Button(id = wxID_COMMONDEFDLGCANCELBTN, label = 'Cancel', name = ... | def _init_ctrls(self, prnt): wxDialog.__init__(self, id = wxID_COMMONDEFDLG, name = 'CommonDefDlg', parent = prnt, pos = wxPoint(398, 249), size = wxSize(192, 220), style = wxDEFAULT_DIALOG_STYLE, title = 'Common definition') self.SetClientSize(wxSize(184, 200)) |
self.Center(wxBOTH) | self.Center(wx.BOTH) | def __init__(self, parent, name='', propIdx=0): self._comDefName = '' self._comDefName = name self._propTypeIdx = 0 self._propTypeIdx = propIdx self._init_ctrls(parent) |
self.EndModal(wxID_OK) | self.EndModal(wx.ID_OK) | def OnOkbtnButton(self, event): self.result = ( self.propMap[self.propTypeRBx.GetSelection()], self.comDefNameTC.GetValue() ) self.EndModal(wxID_OK) |
self.EndModal(wxID_CANCEL) | self.EndModal(wx.ID_CANCEL) | def OnCancelbtnButton(self, event): self.result = ( '', '' ) self.EndModal(wxID_CANCEL) |
assert len(strCol) == 7 and strCol[0] == ' return wxColour(string.atoi('0x'+strCol[1:3], 16), | assert len(strCol) == 7 and strCol[0] == ' return wx.Colour(string.atoi('0x'+strCol[1:3], 16), | def strToCol(strCol): assert len(strCol) == 7 and strCol[0] == '#', 'Not a valid colour string' return wxColour(string.atoi('0x'+strCol[1:3], 16), string.atoi('0x'+strCol[3:5], 16), string.atoi('0x'+strCol[5:7], 16)) |
return string.join(res, ',') | return ','.join(res) | def writePropVal(names, values): res = [] for name in names: if name: res.append(values[name] and name+':'+values[name] or name) return string.join(res, ',') |
items = string.split(prop, ',') | items = prop.split(',') | def parseProp(prop): items = string.split(prop, ',') names = [] values = {} for item in items: nameVal = string.split(item, ':') names.append(string.strip(nameVal[0])) if len(nameVal) == 1: values[nameVal[0]] = '' else: values[nameVal[0]] = string.strip(nameVal[1]) return names, values |
nameVal = string.split(item, ':') names.append(string.strip(nameVal[0])) | nameVal = item.split(':') names.append(nameVal[0].strip()) | def parseProp(prop): items = string.split(prop, ',') names = [] values = {} for item in items: nameVal = string.split(item, ':') names.append(string.strip(nameVal[0])) if len(nameVal) == 1: values[nameVal[0]] = '' else: values[nameVal[0]] = string.strip(nameVal[1]) return names, values |
values[nameVal[0]] = string.strip(nameVal[1]) | values[nameVal[0]] = nameVal[1].strip() | def parseProp(prop): items = string.split(prop, ',') names = [] values = {} for item in items: nameVal = string.split(item, ':') names.append(string.strip(nameVal[0])) if len(nameVal) == 1: values[nameVal[0]] = '' else: values[nameVal[0]] = string.strip(nameVal[1]) return names, values |
name, value = string.split(prop, '=') return int(string.split(name, '.')[-1]), value | name, value = prop.split('=') return int(name.split('.')[-1]), value | def parsePropLine(prop): name, value = string.split(prop, '=') return int(string.split(name, '.')[-1]), value |
else: prop = styleDict[wxSTC_STYLE_DEFAULT] | else: prop = styleDict[wx.stc.STC_STYLE_DEFAULT] | def setSTCStyles(stc, styles, styleIdNames, commonDefs, lang, lexer, keywords): #wxLogMessage('Set style') styleDict = {} styleNumIdxMap = {} # build style dict based on given styles for numStyle in styles: num, style = parsePropLine(numStyle) styleDict[num] = style # Add blank style entries for undefined styles newS... |
bkCol = strToCol(vals['back']) | bkCol = strToCol(vals['back']%commonDefs) | def setSTCStyles(stc, styles, styleIdNames, commonDefs, lang, lexer, keywords): #wxLogMessage('Set style') styleDict = {} styleNumIdxMap = {} # build style dict based on given styles for numStyle in styles: num, style = parsePropLine(numStyle) styleDict[num] = style # Add blank style entries for undefined styles newS... |
bkCol = wxWHITE | bkCol = wx.WHITE | def setSTCStyles(stc, styles, styleIdNames, commonDefs, lang, lexer, keywords): #wxLogMessage('Set style') styleDict = {} styleNumIdxMap = {} # build style dict based on given styles for numStyle in styles: num, style = parsePropLine(numStyle) styleDict[num] = style # Add blank style entries for undefined styles newS... |
stc.StyleSetSpec(wxSTC_STYLE_DEFAULT, styleDict[wxSTC_STYLE_DEFAULT] % commonDefs) | stc.StyleSetSpec(wx.stc.STC_STYLE_DEFAULT, styleDict[wx.stc.STC_STYLE_DEFAULT] % commonDefs) | def setSTCStyles(stc, styles, styleIdNames, commonDefs, lang, lexer, keywords): #wxLogMessage('Set style') styleDict = {} styleNumIdxMap = {} # build style dict based on given styles for numStyle in styles: num, style = parsePropLine(numStyle) styleDict[num] = style # Add blank style entries for undefined styles newS... |
commonDefsFile = 'common.defs.%s'%(wxPlatform == '__WXMSW__' and 'msw' or 'gtk') | commonDefsFile = 'common.defs.%s'%(platformSettings[wx.Platform][0]) | def setSTCStyles(stc, styles, styleIdNames, commonDefs, lang, lexer, keywords): #wxLogMessage('Set style') styleDict = {} styleNumIdxMap = {} # build style dict based on given styles for numStyle in styles: num, style = parsePropLine(numStyle) styleDict[num] = style # Add blank style entries for undefined styles newS... |
return eval(string.replace(conf.Read(name), '\r\n', '\n')+'\n') | ns = {} ns.update(wxPython.stc.__dict__) ns['wx'] = wx value = conf.Read(name).replace('\r\n', '\n')+'\n' try: return eval(value, ns) except: print value raise | def readPyValFromConfig(conf, name): return eval(string.replace(conf.Read(name), '\r\n', '\n')+'\n') |
cfg = wxFileConfig(localFilename=configFile, style=wxCONFIG_USE_LOCAL_FILE) | if not os.path.exists(configFile): raise Exception, 'Config file %s not found'%configFile cfg = wx.FileConfig(localFilename=configFile, style= wx.CONFIG_USE_LOCAL_FILE) | def initFromConfig(configFile, lang): cfg = wxFileConfig(localFilename=configFile, style=wxCONFIG_USE_LOCAL_FILE) cfg.SetExpandEnvVars(False) # read in all group names for this language groupPrefix = 'style.%s'%lang gpLen = len(groupPrefix) predefStyleGroupNames, otherLangStyleGroupNames = [], [] cont, val, idx = cfg.... |
name, value = string.split(style, '=') config.Write(name, string.strip(value)) | name, value = style.split('=') config.Write(name, value.strip()) | def writeStylesToConfig(config, group, styles): config.SetPath('') config.DeleteGroup(group) config.SetPath(group) for style in styles: name, value = string.split(style, '=') config.Write(name, string.strip(value)) config.SetPath('') |
from wxPython.help import * app = wxPySimpleApp() provider = wxSimpleHelpProvider() wxHelpProvider_Set(provider) base = os.path.split(__file__)[0] config = os.path.abspath(os.path.join(base, 'stc-styles.rc.cfg')) | app = wx.PySimpleApp() provider = wx.SimpleHelpProvider() wx.HelpProvider.Set(provider) home = os.environ.get('HOME') if home: home = os.path.join(home, '.boa-constructor') if not os.path.exists(home): home = '.' else: home = '.' config = os.path.abspath(os.path.join(home, 'stc-styles.rc.cfg')) | def initSTC(stc, config, lang): """ Main module entry point. Initialise a wxSTC from given config file.""" (cfg, commonDefs, styleIdNames, styles, predefStyleGroupNames, predefStyleGroups, otherLangStyleGroupNames, otherLangStyleGroups, displaySrc, lexer, keywords, braceInfo) = initFromConfig(config, lang) setSTCStyle... |
f = wxFrame(None, -1, 'Test frame (double click for editor)') stc = wxStyledTextCtrl(f, -1) | f = wx.Frame(None, -1, 'Test frame (double click for editor)') stc = wx.stc.StyledTextCtrl(f, -1) | def initSTC(stc, config, lang): """ Main module entry point. Initialise a wxSTC from given config file.""" (cfg, commonDefs, styleIdNames, styles, predefStyleGroupNames, predefStyleGroups, otherLangStyleGroupNames, otherLangStyleGroups, displaySrc, lexer, keywords, braceInfo) = initFromConfig(config, lang) setSTCStyle... |
EVT_LEFT_DCLICK(stc, OnDblClick) | stc.Bind(wx.EVT_LEFT_DCLICK, OnDblClick) | def OnDblClick(evt, stc=stc): dlg = STCStyleEditDlg(None, 'Python', 'python', config, (stc,)) try: dlg.ShowModal() finally: dlg.Destroy() |
self.stdioWin = sys.stdout = sys.stderr = wxPyStdOutWindow() | raise self.error, 'wxPyStdOutWindow not yet implemented.' | def RedirectStdio(self, filename): if filename: sys.stdout = sys.stderr = open(filename, 'a') else: #raise self.error, 'wxPyStdOutWindow not yet implemented.' self.stdioWin = sys.stdout = sys.stderr = wxPyStdOutWindow() |
dirflags = '-DWXTOPDIR=%s../' % prefix | topdirflags = '-DWXTOPDIR=%s../' % prefix srcdirflags = '' | def onSubmakefile(type, dirname, names): bakes = [x for x in names if x.endswith('.bkl')] if len(bakes) == 0: return bakes.sort() dirname = dirname.replace(os.sep, '/') depth = dirname.count('/') - 2 if depth <= 0: return if type==SAMPLES_DIR: prefix = ''.join(['../' for i in range(0,depth)]) dirflags = '-DWXTOPDIR=%s... |
dirflags = '-DSRCDIR=../../src/%s' % dirname.split('/')[-1] dirflags += ' -DWXTOPDIR=../../../' | srcdirflags = '-DSRCDIR=../../src/%s' % dirname.split('/')[-1] topdirflags = ' -DWXTOPDIR=../../../' | def onSubmakefile(type, dirname, names): bakes = [x for x in names if x.endswith('.bkl')] if len(bakes) == 0: return bakes.sort() dirname = dirname.replace(os.sep, '/') depth = dirname.count('/') - 2 if depth <= 0: return if type==SAMPLES_DIR: prefix = ''.join(['../' for i in range(0,depth)]) dirflags = '-DWXTOPDIR=%s... |
'all':dirflags, | 'all':topdirflags, 'not_autoconf':srcdirflags, | def onSubmakefile(type, dirname, names): bakes = [x for x in names if x.endswith('.bkl')] if len(bakes) == 0: return bakes.sort() dirname = dirname.replace(os.sep, '/') depth = dirname.count('/') - 2 if depth <= 0: return if type==SAMPLES_DIR: prefix = ''.join(['../' for i in range(0,depth)]) dirflags = '-DWXTOPDIR=%s... |
self._setOORandCallbackInfo(PyShapeEvtHandler) | self._setOORandCallbackInfo(PyShape) | def __init__(self, *args, **kwargs): """__init__(self, PyShapeCanvas can=None) -> PyShape""" newobj = _ogl.new_PyShape(*args, **kwargs) self.this = newobj.this self.thisown = 1 del newobj.thisown self._setOORandCallbackInfo(PyShapeEvtHandler) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.