def on_show_object(self, object): "Callback from pug.App" for pagenum in range(self.notebook.GetPageCount()): page = self.notebook.GetPage(pagenum) try: if page.pug_view_key == object: self.notebook.SetSelection(pagenum) highlight_frame( self) return except: continue
def on_show_object(self, object): "Callback from pug.App" for pagenum in range(self.notebook.GetPageCount()): page = self.notebook.GetPage(pagenum) try: if page.pug_view_key == object: self.notebook.SetSelection(pagenum) highlight_frame(self) return except: continue
def show_object_frame(self, object): """show_object_frame(object) Raise the pugframe viewing 'object'. If it exists return the frame... otherwise, return None. If the frame has an 'on_show_object' function, it will be called with object as an argument. Otherwise it will be de-iconized, raised, and will 'RequestUserAttention' """ frame = self.get_object_frame(object) if frame: if hasattr(frame, 'on_show_object'): frame.on_show_object(object) else: highlight_frame(frame) return frame
def open_code_editor(): """open_code_editor(): open pug's code editor window""" highlight_frame(wx.GetApp().code_editor)