Enlightenment CVS committal Author : leviathan Project : e17 Module : proto
Dir : e17/proto/etk-perl/etk_test Modified Files: etk_test.pl Log Message: + Adding table test =================================================================== RCS file: /cvs/e/e17/proto/etk-perl/etk_test/etk_test.pl,v retrieving revision 1.13 retrieving revision 1.14 diff -u -3 -r1.13 -r1.14 --- etk_test.pl 13 Jun 2006 00:13:44 -0000 1.13 +++ etk_test.pl 16 Jun 2006 18:41:16 -0000 1.14 @@ -46,6 +46,7 @@ use Etk::Tree::Model::Double; use Etk::Tree::Model::IconText; use Etk::Tree::Model::Checkbox; +use Etk::Alignment; Etk::Init(); @@ -924,10 +925,58 @@ sub table_window_show { my $win = Etk::Window->new("Etk-Perl Table Test"); - my $label = Etk::Label->new("<b>Etk::Table test is not implemented yet.</b>"); + + my @widgets; + + push @widgets, Etk::Button->new(Etk::Stock::DocumentOpen); + $widgets[0]->LabelSet("Set Icon"); + + push @widgets, + Etk::Label->new("App name"), + Etk::Entry->new(), + Etk::Label->new("Generic Info"), + Etk::Entry->new(), + Etk::Label->new("Comments"), + Etk::Entry->new(), + Etk::Label->new("Executable"), + Etk::Entry->new(), + Etk::Label->new("Window name"), + Etk::Entry->new(), + Etk::Label->new("Window class"), + Etk::Entry->new(), + Etk::Label->new("Startup notify"), + Etk::Entry->new(), + Etk::Label->new("Wait exit"), + Etk::Entry->new(); + + push @widgets, Etk::Button->new(Etk::Stock::DialogCancel); + push @widgets, Etk::Button->new(Etk::Stock::DocumentSave); - $win->Add($label); - $win->BorderWidthSet(10); + push @widgets, Etk::Image->new("`etk-config --build-dir`/images/test.png"); # ugly + + push @widgets, Etk::Alignment->new(0.5, 0.5, 0, 0); + + $widgets[20]->Add($widgets[0]); + + my $vbox = Etk::VBox->new(0, 0); + my $hbox = Etk::HBox->new(0, 0); + my $table = Etk::Table->new(2, 10, 0); + + $vbox->PackStart($table, 0, 0, 0); + $vbox->PackEnd($hbox, 0, 0, 0); + $hbox->PackEnd($widgets[18], 0, 0, 0); + $hbox->PackEnd($widgets[17], 0, 0, 0); + + $table->Attach($widgets[19], 0, 0, 0, 0, 0, 0, Etk::FillPolicy::None); + $table->Attach($widgets[20], 1, 1, 0, 0, 0, 0, Etk::FillPolicy::HExpand | Etk::FillPolicy::HFill); + + my $index = 1; + for my $i (2 .. 9) { + $table->Attach($widgets[$index], 0, 0, $i, $i, 0, 0, Etk::FillPolicy::HFill); + $table->AttachDefaults($widgets[$index + 1], 1, 1, $i, $i); + $index += 2; + } + $win->Add($vbox); $win->ShowAll(); } _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs