Glade-Perl
view release on metacpan or search on metacpan
Glade/PerlUIExtra.pm view on Meta::CPAN
sub new_GnomeCanvas {
my ($class, $parent, $proto, $depth) = @_;
my $me = "$class->new_GnomeCanvas";
my $name = $proto->{name};
my $pixels_per_unit = $class->use_par($proto, 'pixels_per_unit', $DEFAULT, 1 );
my $scroll_x1 = $class->use_par($proto, 'scroll_x1',$DEFAULT, 0 );
my $scroll_y1 = $class->use_par($proto, 'scroll_y1',$DEFAULT, 0 );
my $scroll_x2 = $class->use_par($proto, 'scroll_x2',$DEFAULT, 100 );
my $scroll_y2 = $class->use_par($proto, 'scroll_y2',$DEFAULT, 100 );
my $anti_aliased = $class->use_par($proto, 'anti_aliased', $BOOL, 'False' );
if ($anti_aliased) {
$class->add_to_UI( $depth, "\$widgets->{'$name'} = ".
"new_aa Gnome::Canvas;" );
} else {
$class->add_to_UI( $depth, "\$widgets->{'$name'} = ".
"new Gnome::Canvas;" );
}
$class->add_to_UI( $depth, "\$widgets->{'$name'}->set_scroll_region(".
"$scroll_x1, $scroll_y1, $scroll_x2, $scroll_y2 );" );
$class->add_to_UI( $depth, "\$widgets->{'$name'}->set_pixels_per_unit(".
"$pixels_per_unit );" );
$class->pack_widget($parent, $name, $proto, $depth );
return $widgets->{$name};
}
sub new_GnomeColorPicker {
my ($class, $parent, $proto, $depth) = @_;
my $me = "$class->new_GnomeColorPicker";
my $name = $proto->{name};
my $dither = $class->use_par($proto, 'dither', $BOOL, 'True' );
my $use_alpha = $class->use_par($proto, 'use_alpha',$BOOL, 'False' );
my $title = $class->use_par($proto, 'title', $DEFAULT, '' );
$class->add_to_UI( $depth, "\$widgets->{'$name'} = ".
"new Gnome::ColorPicker;" );
$class->add_to_UI( $depth, "\$widgets->{'$name'}->set_dither(".
"$dither );" );
$class->add_to_UI( $depth, "\$widgets->{'$name'}->set_use_alpha(".
"$use_alpha );" );
$class->add_to_UI( $depth, "\$widgets->{'$name'}->set_title(".
"_('$title') );" );
$class->pack_widget($parent, $name, $proto, $depth );
return $widgets->{$name};
}
sub new_GnomeDateEdit {
my ($class, $parent, $proto, $depth) = @_;
my $me = "$class->new_GnomeDateEdit";
my $name = $proto->{name};
my $show_time = $class->use_par($proto, 'show_time', $BOOL, 'True' );
my $use_24_format = $class->use_par($proto, 'use_24_format', $BOOL, 'True' );
my $week_start_monday = $class->use_par($proto, 'week_start_monday', $BOOL, 'False' );
my $lower_hour = $class->use_par($proto, 'lower_hour', $DEFAULT, 7 );
my $upper_hour = $class->use_par($proto, 'upper_hour', $DEFAULT, 19 );
$class->add_to_UI( $depth, "\$widgets->{'$name'} = new Gnome::DateEdit(".
"0, $show_time, $use_24_format);" );
$class->add_to_UI( $depth, "\$widgets->{'$name'}->set_popup_range(".
"$lower_hour, $upper_hour );" );
$class->pack_widget($parent, $name, $proto, $depth );
return $widgets->{$name};
}
sub new_GnomeDialog {
my ($class, $parent, $proto, $depth) = @_;
my $me = "$class->new_GnomeDialog";
my $name = $proto->{name};
my $title = $class->use_par($proto, 'title', $DEFAULT, '' );
my $auto_close = $class->use_par($proto, 'auto_close', $BOOL, 'True' );
my $hide_on_close = $class->use_par($proto, 'hide_on_close', $BOOL, 'True' );
$class->add_to_UI( $depth, "\$widgets->{'$name'} = new Gnome::Dialog(".
"_('$title'));" );
$class->add_to_UI( $depth, "\$widgets->{'$name'}->close_hides(".
"$hide_on_close );" );
$class->add_to_UI( $depth, "\$widgets->{'$name'}->set_close(".
"$auto_close );" );
$class->set_window_properties($parent, $name, $proto, $depth );
return $widgets->{$name};
}
sub new_GnomeDock {
my ($class, $parent, $proto, $depth) = @_;
my $me = "$class->new_GnomeDock";
my $name = $proto->{name};
my $allow_floating = $class->use_par($proto, 'allow_floating', $BOOL, 'True' );
my $child_name = $class->use_par($proto, 'child_name', $DEFAULT, 'True' );
if ($child_name) {
$class->add_to_UI( $depth, "\$widgets->{'$name'} = ".
"$current_form\{'$parent'}->get_dock;" );
} else {
$class->add_to_UI( $depth, "\$widgets->{'$name'} = new Gnome::Dock;" );
}
$class->add_to_UI( $depth, "\$widgets->{'$name'}->allow_floating_items(".
"$allow_floating );" );
$class->pack_widget($parent, $name, $proto, $depth );
return $widgets->{$name};
}
sub new_GnomeDockItem {
my ($class, $parent, $proto, $depth) = @_;
my $me = "$class->new_GnomeDockItem";
my $name = $proto->{name};
my $shadow_type = $class->use_par($proto, 'shadow_type', $LOOKUP, 'out' );
my @options;
push @options, 'exclusive' if
$class->use_par($proto, 'exclusive', $BOOL, 'True' );
push @options, 'never_horizontal' if
$class->use_par($proto, 'never_horizontal', $BOOL, 'False' );
push @options, 'never_vertical' if
$class->use_par($proto, 'never_vertical', $BOOL, 'True' );
push @options, 'locked' if
( run in 0.954 second using v1.01-cache-2.11-cpan-364913b4093 )