mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-22 17:12:55 +08:00
37 lines
811 B
Python
37 lines
811 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))
|
|
|
|
def clean(self):
|
|
print("%s.clean()" % (self.name))
|
|
|
|
class Screen(widget):
|
|
name = "screen"
|
|
|
|
_screen = Screen(None)
|
|
|
|
class label(widget):
|
|
name = "label"
|
|
|
|
def screen():
|
|
return _screen
|