예제 #1
0
 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
예제 #2
0
 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
예제 #3
0
파일: app.py 프로젝트: bcorfman/pug
    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
예제 #4
0
    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
예제 #5
0
def open_code_editor():
    """open_code_editor(): open pug's code editor window"""
    highlight_frame(wx.GetApp().code_editor)