Ejemplo n.º 1
0
 def __init__(
     self,
     title=None,
     defSize=None,
     queueing=flags.WQ_LINE,
     bAutoRestore=1,
     style=None,
     makeDoc=None,
     makeFrame=None,
     makeView=None,
 ):
     """init the output window -
     Params
     title=None -- What is the title of the window
     defSize=None -- What is the default size for the window - if this
                     is a string, the size will be loaded from the ini file.
     queueing = flags.WQ_LINE -- When should output be written
     bAutoRestore=1 -- Should a minimized window be restored.
     style -- Style for Window, or None for default.
     makeDoc, makeFrame, makeView -- Classes for frame, view and window respectively.
     """
     if makeDoc is None:
         makeDoc = WindowOutputDocument
     if makeFrame is None:
         makeFrame = WindowOutputFrame
     if makeView is None:
         makeView = WindowOutputViewScintilla
     docview.DocTemplate.__init__(self, win32ui.IDR_PYTHONTYPE, makeDoc,
                                  makeFrame, makeView)
     self.SetDocStrings("\nOutput\n\nText Documents (*.txt)\n.txt\n\n\n")
     win32ui.GetApp().AddDocTemplate(self)
     self.writeQueueing = queueing
     self.errorCantRecreate = 0
     self.killBuffer = []
     self.style = style
     self.bAutoRestore = bAutoRestore
     self.title = title
     self.bCreating = 0
     self.interruptCount = 0
     if type(defSize) == type(
             ""):  # is a string - maintain size pos from ini file.
         self.iniSizeSection = defSize
         self.defSize = app.LoadWindowSize(defSize)
         self.loadedSize = self.defSize
     else:
         self.iniSizeSection = None
         self.defSize = defSize
     self.currentView = None
     self.outputQueue = queue.Queue(-1)
     self.mainThreadId = win32api.GetCurrentThreadId()
     self.idleHandlerSet = 0
     self.SetIdleHandler()
Ejemplo n.º 2
0
 def GetDefRect(self):
     defRect = app.LoadWindowSize("Debugger Windows\\" + self.title)
     if defRect[2] - defRect[0] == 0:
         defRect = 0, 0, 150, 150
     return defRect