@@ -567,20 +567,20 @@ def mouse_event(self, size, event, button, x, y, focus):
567
567
568
568
569
569
class PopUpLauncher (delegate_to_widget_mixin ('_original_widget' ),
570
- WidgetDecoration ):
570
+ WidgetDecoration ):
571
571
def __init__ (self , original_widget ):
572
572
self .__super .__init__ (original_widget )
573
573
self ._pop_up_widget = None
574
574
575
- def create_pop_up (self ):
575
+ def create_pop_up (self , * args , ** kwargs ):
576
576
"""
577
577
Subclass must override this method and return a widget
578
578
to be used for the pop-up. This method is called once each time
579
579
the pop-up is opened.
580
580
"""
581
581
raise NotImplementedError ("Subclass must override this method" )
582
582
583
- def get_pop_up_parameters (self ):
583
+ def get_pop_up_parameters (self , * args , ** kwargs ):
584
584
"""
585
585
Subclass must override this method and have it return a dict, eg:
586
586
@@ -590,8 +590,8 @@ def get_pop_up_parameters(self):
590
590
"""
591
591
raise NotImplementedError ("Subclass must override this method" )
592
592
593
- def open_pop_up (self ):
594
- self ._pop_up_widget = self .create_pop_up ()
593
+ def open_pop_up (self , * args , ** kwargs ):
594
+ self ._pop_up_widget = self .create_pop_up (* args , ** kwargs )
595
595
self ._invalidate ()
596
596
597
597
def close_pop_up (self ):
@@ -602,7 +602,7 @@ def render(self, size, focus=False):
602
602
canv = self .__super .render (size , focus )
603
603
if self ._pop_up_widget :
604
604
canv = CompositeCanvas (canv )
605
- canv .set_pop_up (self ._pop_up_widget , ** self .get_pop_up_parameters ())
605
+ canv .set_pop_up (self ._pop_up_widget , ** self .get_pop_up_parameters (size , focus ))
606
606
return canv
607
607
608
608
0 commit comments