1 |
package GCE::AttrEdit; |
2 |
|
3 |
=head1 NAME |
4 |
|
5 |
GCE::AttrEdit - an edit wiget for attributes |
6 |
|
7 |
=cut |
8 |
|
9 |
use Gtk2; |
10 |
use Gtk2::Gdk::Keysyms; |
11 |
use Gtk2::SimpleList; |
12 |
|
13 |
use Glib::Object::Subclass Gtk2::VBox; |
14 |
|
15 |
sub INIT_INSTANCE { |
16 |
my ($self) = @_; |
17 |
|
18 |
my $sl = Gtk2::SimpleList->new ('Attr' => 'text', 'Value' => 'text'); |
19 |
|
20 |
my $test = { health => 12, foo => "fewger" }; |
21 |
|
22 |
@{$sl->{data}} = map { [$_, $test->{$_}] } keys %$test; |
23 |
$sl->set_column_editable (1, 1); |
24 |
|
25 |
$self->pack_start ($sl, 1, 1, 0); |
26 |
} |
27 |
|
28 |
|
29 |
=head1 AUTHOR |
30 |
|
31 |
Marc Lehmann <schmorp@schmorp.de> |
32 |
http://home.schmorp.de/ |
33 |
|
34 |
Robin Redeker <elmex@ta-sa.org> |
35 |
http://www.ta-sa.org/ |
36 |
|
37 |
=cut |
38 |
1; |