From e1ecdac525d20120a4e67fa6ee5b6d0362922f45 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 11 Sep 2013 09:03:50 +0200 Subject: add support for Gtk3::Overlay --- perl-install/mygtk3.pm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'perl-install') diff --git a/perl-install/mygtk3.pm b/perl-install/mygtk3.pm index 5934f32cf..ff0516529 100644 --- a/perl-install/mygtk3.pm +++ b/perl-install/mygtk3.pm @@ -796,6 +796,27 @@ sub _gtk__Fixed { $w; } +sub _gtk__Overlay { + my ($w, $opts, $_class, $_action) = @_; + + if (!$w) { + $w = Gtk3::Overlay->new; + _gtknew_handle_overlay_children($w, $opts); + } + $w; +} + +sub _gtknew_handle_overlay_children { + my ($w, $opts) = @_; + $w->add(delete $opts->{main_child}) if $opts->{main_child}; + $opts->{children} ||= []; + foreach (@{$opts->{children}}) { + $w->add_overlay($_); + } + delete $opts->{children}; +} + + sub _gtk__Layout { my ($w, $opts, $_class, $_action) = @_; -- cgit v1.2.1