comparison src/cagou/core/xmlui.py @ 125:b6e6afb0dc46

xmlui: added LabelContainer and updated XMLUIPanel following changes in main class
author Goffi <goffi@goffi.org>
date Thu, 05 Apr 2018 15:59:50 +0200
parents f67b9baa81f0
children
comparison
equal deleted inserted replaced
124:7f7f3b8eb154 125:b6e6afb0dc46
292 292
293 def _xmluiAppend(self, widget): 293 def _xmluiAppend(self, widget):
294 self.add_widget(widget) 294 self.add_widget(widget)
295 295
296 296
297 class LabelContainer(PairsContainer, xmlui.LabelContainer):
298 pass
299
300
297 class TabsPanelContainer(TabbedPanelItem): 301 class TabsPanelContainer(TabbedPanelItem):
298 302
299 def _xmluiAppend(self, widget): 303 def _xmluiAppend(self, widget):
300 self.add_widget(widget) 304 self.add_widget(widget)
301 305
477 pass 481 pass
478 482
479 class XMLUIPanel(xmlui.XMLUIPanel, ScrollView): 483 class XMLUIPanel(xmlui.XMLUIPanel, ScrollView):
480 widget_factory = WidgetFactory() 484 widget_factory = WidgetFactory()
481 485
482 def __init__(self, host, parsed_xml, title=None, flags=None, callback=None, profile=C.PROF_KEY_NONE): 486 def __init__(self, host, parsed_xml, title=None, flags=None, callback=None, ignore=None, profile=C.PROF_KEY_NONE):
483 ScrollView.__init__(self) 487 ScrollView.__init__(self)
484 self.close_cb = None 488 self.close_cb = None
485 self._grid = XMLUIPanelGrid() 489 self._grid = XMLUIPanelGrid()
486 self._post_treats = [] # list of callback to call after UI is constructed 490 self._post_treats = [] # list of callback to call after UI is constructed
487 ScrollView.add_widget(self, self._grid) 491 ScrollView.add_widget(self, self._grid)
488 xmlui.XMLUIPanel.__init__(self, host, parsed_xml, title, flags, callback, profile) 492 xmlui.XMLUIPanel.__init__(self,
493 host,
494 parsed_xml,
495 title=title,
496 flags=flags,
497 callback=callback,
498 ignore=ignore,
499 profile=profile)
489 500
490 def add_widget(self, wid): 501 def add_widget(self, wid):
491 self._grid.add_widget(wid) 502 self._grid.add_widget(wid)
492 503
493 def setCloseCb(self, close_cb): 504 def setCloseCb(self, close_cb):