tuikit/application.py
changeset 46 2b43a7f38c34
parent 36 caf927c3f10b
child 49 1611c462c3e3
equal deleted inserted replaced
45:43b2279b06e1 46:2b43a7f38c34
    18         self.top = self
    18         self.top = self
    19 
    19 
    20         self.timeout = []
    20         self.timeout = []
    21         self.timelast = None
    21         self.timelast = None
    22 
    22 
    23     def draw(self, screen, x=0, y=0):
    23     def draw(self, driver, x=0, y=0):
    24         """Draw the top window and its children.
    24         """Draw the top window and its children.
    25 
    25 
    26         This is entry point for full screen redraw.
    26         This is entry point for full screen redraw.
    27 
    27 
    28         """
    28         """
    29         screen.erase()
    29         driver.erase()
    30         super().draw(screen, x, y)
    30         Container.draw(self, driver, x, y)
    31 
    31 
    32     def add_timeout(self, s, func):
    32     def add_timeout(self, s, func):
    33         if not len(self.timeout):
    33         if not len(self.timeout):
    34             self.timelast = time.time()
    34             self.timelast = time.time()
    35         self.timeout += [[s, func]]
    35         self.timeout += [[s, func]]
   135         driver.setcolor('button-active',           'black on cyan')
   135         driver.setcolor('button-active',           'black on cyan')
   136         driver.setcolor('menu',                    'black on cyan')
   136         driver.setcolor('menu',                    'black on cyan')
   137         driver.setcolor('menu-active',             'white on cyan, bold')
   137         driver.setcolor('menu-active',             'white on cyan, bold')
   138         driver.setcolor('combo:normal',            'black on green')
   138         driver.setcolor('combo:normal',            'black on green')
   139 
   139 
       
   140         driver.setcolor('test-blink',              'cyan on blue, blink')
       
   141         driver.setcolor('test-bold',               'cyan on blue, bold')
       
   142         driver.setcolor('test-dim',                'cyan on blue, dim')
       
   143         driver.setcolor('test-standout',           'cyan on blue, standout')
       
   144         driver.setcolor('test-underline',          'cyan on blue, underline')
       
   145 
   140 
   146 
   141     def get_driver_instance(self, name):
   147     def get_driver_instance(self, name):
   142         module = __import__('tuikit.driver_' + name, fromlist=['driverclass'])
   148         module = __import__('tuikit.driver_' + name, fromlist=['driverclass'])
   143         return module.driverclass()
   149         return module.driverclass()
   144 
   150