2023-02-22 22:05:08 +08:00

37 lines
777 B
Python

class widget:
name = "widget"
def __init__(self, parent):
if parent == None:
name = 'None'
else:
name = parent.name
print('%s.__init__(%s)' % (self.name, name))
def align(self, align, posx, posy):
print('%s.align(%d, %d, %d)' % (self.name, align, posx, posy))
def set_width(self, width):
print('%s.set_wdith(%d)' % (self.name, width))
def set_height(self, height):
print('%s.set_height(%d)' % (self.name, height))
def set_text(self, text):
print('%s.set_text("%s")' % (self.name, text))
class Screen:
name = "screen"
_screen = Screen(None)
class label(widget):
name = "label"
def screen():
return _screen
def clean():
print('screen.clean()')