def __init__(self, program, host):
    if app.config.strict_debug:
        assert host
    Window.__init__(self, program, host)
    self.host = host
    self.showFooter = True
    self.savedScrollPositions = {}
    self.showLineNumbers = self.program.prefs.editor.get('showLineNumbers', True)
    self.showMessageLine = True
    self.showRightColumn = True
    self.showTopInfo = True
    self.statusLineCount = (0 if self.program.prefs.status.get('seenTips') else 8)
    self.topRows = 2
    self.controller = app.controller.MainController(self)
    self.controller.add(app.em_editor.EmacsEdit(self))
    self.controller.add(app.vi_editor.ViEdit(self))
    self.controller.add(app.cu_editor.CuaPlusEdit(self))
    self.userIntent = 'edit'
    if 1:
        self.confirmClose = LabeledLine(self.program, self, 'Save changes? (yes, no, or cancel): ')
        self.confirmClose.setController(app.cu_editor.ConfirmClose)
    if 1:
        self.confirmOverwrite = LabeledLine(self.program, self, 'Overwrite exiting file? (yes or no): ')
        self.confirmOverwrite.setController(app.cu_editor.ConfirmOverwrite)
    self.contextMenu = Menu(self.program, self)
    if 1:
        self.interactiveFind = InteractiveFind(self.program, self)
        self.interactiveFind.setParent(self, 0)
    else:
        self.interactiveFind = LabeledLine(self.program, self, u'find: ')
        self.interactiveFind.setController(app.cu_editor.InteractiveFind)
    if 1:
        self.interactiveGoto = LabeledLine(self.program, self, u'goto: ')
        self.interactiveGoto.setController(app.cu_editor.InteractiveGoto)
    if 1:
        self.interactivePrediction = LabeledLine(self.program, self, u'p: ')
        self.interactivePrediction.setController(app.cu_editor.InteractivePrediction)
    if 1:
        self.interactivePrompt = LabeledLine(self.program, self, u'e: ')
        self.interactivePrompt.setController(app.cu_editor.InteractivePrompt)
    if 1:
        self.interactiveQuit = LabeledLine(self.program, self, u'Save changes? (yes, no, or cancel): ')
        self.interactiveQuit.setController(app.cu_editor.InteractiveQuit)
    if 1:
        self.topInfo = TopInfo(self.program, self)
        self.topInfo.setParent(self, 0)
        if (not self.showTopInfo):
            self.topInfo.detach()
    if 1:
        self.statusLine = StatusLine(self.program, self)
        self.statusLine.setParent(self, 0)
        if (not self.showFooter):
            self.statusLine.detach()
    if 1:
        self.lineNumberColumn = LineNumbers(self.program, self)
        self.lineNumberColumn.setParent(self, 0)
        if (not self.showLineNumbers):
            self.lineNumberColumn.detach()
    if 1:
        self.logoCorner = ViewWindow(self.program, self)
        self.logoCorner.name = u'Logo'
        self.logoCorner.setParent(self, 0)
    if 1:
        self.rightColumn = ViewWindow(self.program, self)
        self.rightColumn.name = u'Right'
        self.rightColumn.setParent(self, 0)
        if (not self.showRightColumn):
            self.rightColumn.detach()
    if 1:
        self.popupWindow = PopupWindow(self.program, self)
    if self.showMessageLine:
        self.messageLine = MessageLine(self.program, self)
        self.messageLine.setParent(self, 0)
    self.showTips = self.program.prefs.status.get(u'showTips')
    self.statusLineCount = (8 if self.showTips else 1)
def __init__(self, program, host):
    if app.config.strict_debug:
        assert host
    Window.__init__(self, program, host)
    self.host = host
    self.showFooter = True
    self.savedScrollPositions = {}
    self.showLineNumbers = self.program.prefs.editor.get('showLineNumbers', True)
    self.showMessageLine = True
    self.showRightColumn = True
    self.showTopInfo = True
    self.statusLineCount = (0 if self.program.prefs.status.get('seenTips') else 8)
    self.topRows = 2
    self.controller = app.controller.MainController(self)
    self.controller.add(app.em_editor.EmacsEdit(self))
    self.controller.add(app.vi_editor.ViEdit(self))
    self.controller.add(app.cu_editor.CuaPlusEdit(self))
    self.userIntent = 'edit'
    if 1:
        self.confirmClose = LabeledLine(self.program, self, 'Save changes? (yes, no, or cancel): ')
        self.confirmClose.setController(app.cu_editor.ConfirmClose)
    if 1:
        self.confirmOverwrite = LabeledLine(self.program, self, 'Overwrite exiting file? (yes or no): ')
        self.confirmOverwrite.setController(app.cu_editor.ConfirmOverwrite)
    self.contextMenu = Menu(self.program, self)
    if 1:
        self.interactiveFind = InteractiveFind(self.program, self)
        self.interactiveFind.setParent(self, 0)
    else:
        self.interactiveFind = LabeledLine(self.program, self, u'find: ')
        self.interactiveFind.setController(app.cu_editor.InteractiveFind)
    if 1:
        self.interactiveGoto = LabeledLine(self.program, self, u'goto: ')
        self.interactiveGoto.setController(app.cu_editor.InteractiveGoto)
    if 1:
        self.interactivePrediction = LabeledLine(self.program, self, u'p: ')
        self.interactivePrediction.setController(app.cu_editor.InteractivePrediction)
    if 1:
        self.interactivePrompt = LabeledLine(self.program, self, u'e: ')
        self.interactivePrompt.setController(app.cu_editor.InteractivePrompt)
    if 1:
        self.interactiveQuit = LabeledLine(self.program, self, u'Save changes? (yes, no, or cancel): ')
        self.interactiveQuit.setController(app.cu_editor.InteractiveQuit)
    if 1:
        self.topInfo = TopInfo(self.program, self)
        self.topInfo.setParent(self, 0)
        if (not self.showTopInfo):
            self.topInfo.detach()
    if 1:
        self.statusLine = StatusLine(self.program, self)
        self.statusLine.setParent(self, 0)
        if (not self.showFooter):
            self.statusLine.detach()
    if 1:
        self.lineNumberColumn = LineNumbers(self.program, self)
        self.lineNumberColumn.setParent(self, 0)
        if (not self.showLineNumbers):
            self.lineNumberColumn.detach()
    if 1:
        self.logoCorner = ViewWindow(self.program, self)
        self.logoCorner.name = u'Logo'
        self.logoCorner.setParent(self, 0)
    if 1:
        self.rightColumn = ViewWindow(self.program, self)
        self.rightColumn.name = u'Right'
        self.rightColumn.setParent(self, 0)
        if (not self.showRightColumn):
            self.rightColumn.detach()
    if 1:
        self.popupWindow = PopupWindow(self.program, self)
    if self.showMessageLine:
        self.messageLine = MessageLine(self.program, self)
        self.messageLine.setParent(self, 0)
    self.showTips = self.program.prefs.status.get(u'showTips')
    self.statusLineCount = (8 if self.showTips else 1)