def __init__(self, parent, **kwds): wx.GetApp().web_ctrl = self self.component = False if 'component' in kwds: del kwds['component'] self.component = True SchBaseCtrl.__init__(self, parent, kwds) if 'style' in kwds: kwds['style'] |= wx.WANTS_CHARS else: kwds['style'] = wx.WANTS_CHARS CEFControl.__init__(self, parent, **kwds) href = self.href base_web_browser.__init__(self) if hasattr(self.GetParent(), 'any_parent_command'): self.GetParent().any_parent_command('set_handle_info', 'browser', self) if hasattr(self.GetParent(), 'any_parent_command'): self.GetParent().any_parent_command('show_info') self.edit = False #self.browser.GetMainFrame().LoadUrl("about:blank") if href != None: self.go(href) self.afetr_init()
def __init__(self, parent, **kwds): self.href = None SchBaseCtrl.__init__(self, parent, kwds) kwds['style'] = wx.TE_PROCESS_ENTER CodeEditor.__init__(self, parent, **kwds) if self.src: self.set_ext(self.src) self.last_clipboard_state = False self.GetParent().bind_to_ctrl(self, wx.ID_COPY, self._on_copy, self.on_can_copy) self.GetParent().bind_to_ctrl(self, wx.ID_CUT, self._on_cut, self.on_can_cut) self.GetParent().bind_to_ctrl(self, wx.ID_PASTE, self._on_paste, self.on_can_paste) a_table = [(0, wx.WXK_F2, self.on_save), (wx.ACCEL_CTRL, ord('S'), self.on_save)] self.set_acc_key_tab(a_table) if 'data' in self.param: self.SetValue(self.param['data']) self.href_save = None self.Bind(wx.EVT_UPDATE_UI, self.on_check_can_save, id=wx.ID_SAVE) self.Bind(wx.EVT_MENU, self.on_save2, id=wx.ID_SAVE) self.Bind(wx.EVT_UPDATE_UI, self.on_check_can_save_as, id=wx.ID_SAVEAS) self.Bind(wx.EVT_MENU, self.on_save_as, id=wx.ID_SAVEAS)
def __init__(self, parent, **kwds): SchBaseCtrl.__init__(self, parent, kwds) if 'name' in kwds: del kwds['name'] kwds['locals'] = { 'self': self, 'app': wx.GetApp(), 'topwin': wx.GetApp().GetTopWindow(), 'wx': wx } py.crust.Crust.__init__(self, parent, **kwds)
def __init__(self, parent, **kwds): SchBaseCtrl.__init__(self, parent, kwds) if 'name' in kwds: del kwds['name'] kwds['locals'] = { 'self': self, 'app': wx.GetApp(), 'topwin': wx.GetApp().GetTopWindow(), 'wx': wx } kwds['showPySlicesTutorial'] = False py.sliceshell.SlicesShell.__init__(self, parent, **kwds)
def __init__(self, parent, **kwds): SchBaseCtrl.__init__(self, parent, kwds) self.dynamic_choices = DbDict(self.src) if 'style' in kwds: style = kwds['style'] style = style | wx.TE_MULTILINE | wx.TE_PROCESS_ENTER kwds['style'] = style else: kwds['style'] = wx.TE_MULTILINE | wx.TE_PROCESS_ENTER kwds['choices'] = self.dynamic_choices TextCtrlAutoComplete.__init__(self, parent, colNames=('label', 'value'), **kwds) self.SetEntryCallback(self.set_dynamic_choices) self.SetMatchFunction(self.match) if 'data' in self.param: self.SetValue(self.param['data'].encode('utf-8'))
def Init(self, parent, **kwds): kwds['style'] = wx.TRANSPARENT_WINDOW | wx.WANTS_CHARS SchBaseCtrl.__init__(self, parent, kwds) base_web_browser.__init__(self) self.loaded = True self.next_in_new_win = False self.page_loaded = False self.redirect_to_html = [None, None] self.redirect_to_local = True self.last_status_txt = '' if hasattr(self.GetParent(), 'any_parent_command'): self.GetParent().any_parent_command('set_handle_info', 'browser', self) self.Bind(wx.EVT_KEY_DOWN, self.on_key_pressed) self.Bind(wx.html2.EVT_WEBVIEW_LOADED, self.on_web_view_loaded, self) self.Bind(wx.html2.EVT_WEBVIEW_NEWWINDOW, self.on_new_window, self) self.Bind(wx.html2.EVT_WEBVIEW_TITLE_CHANGED, self.on_title_changed, self) self.Bind(wx.html2.EVT_WEBVIEW_NAVIGATING, self.on_navigating, self) self.Bind(wx.html2.EVT_WEBVIEW_ERROR, self.on_error, self) self.Bind(wx.EVT_WINDOW_DESTROY, self.on_destroy) self.Bind(wx.EVT_SET_FOCUS, self.on_setfocus) self.Bind(wx.EVT_KILL_FOCUS, self.on_killfocus) self.edit = False self.local = False if 'url' in kwds and kwds['url'].startswith('http://127.0.0.2'): self.RegisterHandler(WebViewMemoryHandler(self)) self.local = True if hasattr(self.GetParent(), 'any_parent_command'): self.GetParent().any_parent_command('show_info') self.afetr_init()
def __init__(self, *args, **kwds): SchBaseCtrl.__init__(self, parent, kwds) HtmlPreviewCanvas.__init__(self, parent, **kwds)