1#!/usr/bin/perl -w 2use strict; 3use Gtk2::TestHelper tests => 9; 4 5# $Id$ 6 7my $layout = Gtk2::Layout -> new(); 8isa_ok($layout, "Gtk2::Layout"); 9 10$layout = Gtk2::Layout -> new(undef, undef); 11isa_ok($layout, "Gtk2::Layout"); 12 13my $adjustment = Gtk2::Adjustment -> new(0, 0, 100, 1, 5, 10); 14 15$layout -> set_hadjustment($adjustment); 16is($layout -> get_hadjustment(), $adjustment); 17 18$layout -> set_vadjustment($adjustment); 19is($layout -> get_vadjustment(), $adjustment); 20 21$layout = Gtk2::Layout -> new($adjustment, $adjustment); 22isa_ok($layout, "Gtk2::Layout"); 23 24my $label = Gtk2::Label -> new("Bla"); 25 26$layout -> put($label, 23, 42); 27$layout -> move($label, 5, 5); 28 29$layout -> set_size(10, 10); 30is_deeply([$layout -> get_size()], [10, 10]); 31 32is($layout -> get_bin_window(), undef); 33 34my $window = Gtk2::Window -> new(); 35$window -> add($layout); 36$layout -> realize(); 37isa_ok($layout -> get_bin_window(), "Gtk2::Gdk::Window"); 38 39# deprecated but kept for backwards compatibility 40ok($layout -> bin_window() == $layout -> get_bin_window()); 41 42__END__ 43 44Copyright (C) 2003 by the gtk2-perl team (see the file AUTHORS for the 45full list). See LICENSE for more information. 46