예제 #1
0
 def _get_controls(self):
     """
     We represent ourself as a Control to the Dialog, but we pass through
     the events we receive from Dialog.
     """
     base_controls = Wrapper._get_controls(self)
     controls = []
     our_left = self.content_x
     our_right = our_left + self.content_width
     our_bottom = self.content_y
     our_top = our_bottom + self.content_height
     for control, left, right, top, bottom in base_controls:
         controls.append((control, max(left,
                                       our_left), min(right, our_right),
                          min(top, our_top), max(bottom, our_bottom)))
     if self.hscrollbar is not None:
         controls += self.hscrollbar._get_controls()
     if self.vscrollbar is not None:
         controls += self.vscrollbar._get_controls()
     return controls
예제 #2
0
 def _get_controls(self):
     """
     We represent ourself as a Control to the Dialog, but we pass through
     the events we receive from Dialog.
     """
     base_controls = Wrapper._get_controls(self)
     controls = []
     our_left = self.content_x
     our_right = our_left + self.content_width
     our_bottom = self.content_y
     our_top = our_bottom + self.content_height
     for control, left, right, top, bottom in base_controls:
         controls.append(
             (control, max(left, our_left), min(right, our_right), min(top, our_top), max(bottom, our_bottom))
         )
     if self.hscrollbar is not None:
         controls += self.hscrollbar._get_controls()
     if self.vscrollbar is not None:
         controls += self.vscrollbar._get_controls()
     return controls