def __init__(self, horizontal, vertical): Bin.__init__(self) self.view = MiroScrollView.alloc().init() self.view.setAutohidesScrollers_(YES) self.view.setHasHorizontalScroller_(horizontal) self.view.setHasVerticalScroller_(vertical) self.document_view = FlippedView.alloc().init() self.view.setDocumentView_(self.document_view)
def __init__(self, child): Bin.__init__(self) if child: self.add(child) self.label = None self.spacing = 0 self.view = ExpanderView.alloc().init() self.button = self.view.button self.button.setFrameOrigin_( NSPoint(self.BUTTON_PAD_LEFT, self.BUTTON_PAD_TOP)) self.content_view = self.view.content_view
def __init__(self, child): Bin.__init__(self) if child: self.add(child) self.label = None self.spacing = 0 self.view = ExpanderView.alloc().init() self.button = self.view.button self.button.setFrameOrigin_(NSPoint(self.BUTTON_PAD_LEFT, self.BUTTON_PAD_TOP)) self.content_view = self.view.content_view
def __init__(self, xalign=0.0, yalign=0.0, xscale=0.0, yscale=0.0, top_pad=0, bottom_pad=0, left_pad=0, right_pad=0): Bin.__init__(self) self.xalign = xalign self.yalign = yalign self.xscale = xscale self.yscale = yscale self.top_pad = top_pad self.bottom_pad = bottom_pad self.left_pad = left_pad self.right_pad = right_pad if self.child is not None: self.place_children()
def remove_viewport(self): Bin.remove_viewport(self) if self.label is not None: self.label.remove_viewport()
def remove(self): child.parent_is_scroller = False Bin.remove(self)
def add(self, child): child.parent_is_scroller = True Bin.add(self, child)