예제 #1
0
    def _getwnd(self, s, width=10, height=30):
        scrn = self._getscreen(s, width, height)

        wnd = _DmyWnd(scrn)
        wnd.document = scrn.document
        wnd.document.add_window(wnd)

        wnd.cursor = cursor.Cursor(wnd)

        return wnd
예제 #2
0
파일: editor.py 프로젝트: smorin/kaa
    def _oninit(self):
        super()._oninit()

        self._cwnd.leaveok(0)
        self._cwnd.scrollok(0)

        self.screen = screen.Screen()
        self.screen.setsize(*self.getsize())
        self.cursor = cursor.Cursor(self)
        self.pending_str = ''
        self.charattrs = {}
        self.highlight_cursor_row = False
        self.line_overlays = {}
예제 #3
0
 def __init__(self, scrn):
     self.screen = scrn
     self.cursor = cursor.Cursor(self)
예제 #4
0
파일: test_cursor.py 프로젝트: smorin/kaa
 def _getcursor(self, s, width=10, height=10):
     wnd = self._getwnd(s, width, height)
     return cursor.Cursor(wnd)