demos/01_buffer.py
author Radek Brich <radek.brich@devl.cz>
Wed, 19 Mar 2014 20:42:52 +0100
changeset 90 781774a8d568
parent 83 ebe732b9ef19
child 92 b97c4e25ed6d
permissions -rwxr-xr-x
Add timer, adjust inheritance of Widget, Container, Window.

#!/usr/bin/env python3

import sys
sys.path.append('..')

from tuikit.core.buffer import Buffer
from tuikit.driver.driver import Driver


buffer = Buffer(16, 8)
buffer.fill(c='#')
buffer.hline(1, 1, 14, c='-')
buffer.hline(1, 6, 14, c='-')
buffer.vline(7, 2, 4, c='|')
buffer.puts(8, 4, 'Hello!')
buffer.frame()

driver = Driver()
driver.init()
driver.draw(buffer)
driver.close()