my $exttab = ManaTools::Shared::GUI::ExtTab->new(name => ``Tab1'', eventHandler => $dialog, parentWidget => $widget, callback => { my $self = shift; my $yevent = shift; my $backenditem = $_; ... });
$exttab->addSelectorItem(``Label 1'', $backenditem1, sub {
my ($self, $parent, $backendItem) = @_;
my $dialog = $self->parentDialog();
my $factory = $dialog->factory();
my $vbox = $factory->createVBox($parent);
my $button1 = $self->addWidget($backendItem->label() .'_button1', $factory->createPushButton('Button 1', $vbox), sub {
my $self = shift;
my $yevent = shift;
my $backendItem = shift;
my $tab = $self->eventHandler();
...
}, $backendItem);
my $button2 = $self->addWidget($backendItem->label() .'_button2', $factory->createPushButton('Button 2', $vbox), sub {...}, $backendItem);
...
});
$exttab->addSelectorItem(``Label 2'', $backenditem2, sub { my ($self, $parent, $backendItem) = @_; my $factory = $self->parentDialog()->factory(); my $vbox = $factory->createVBox($parent); ... } );
$exttab->addSelectorItem(``Label 3'', $backenditem3, sub { my ($self, $parent, $backendItem) = @_; my $factory = $self->parentDialog()->factory(); my $vbox = $factory->createVBox($parent); ... } );
$exttab->addSelectorItem(``Label 4'', $backenditem4, sub { my ($self, $parent, $backendItem) = @_; my $factory = $self->parentDialog()->factory(); my $vbox = $factory->createVBox($parent); ... } );
$exttab->finishedSelectorItems();
perldoc ManaTools::Shared::GUI::ExtTab
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2, as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
hash ref containing name: a name for the widget to add event to the eventHandler eventHandler: the parent that does eventHandlerRole parentWidget: the parent widget callback: optional parameter to execute a callback when an item has changed
DESCRIPTION
new is inherited from ExtWidget, to create a ExtTab object
$self: this object $yevent: yui::YEvent
OUTPUT
YItem: the selected item
DESCRIPTION
returns the items that is selected when an event fires
$self: this object
OUTPUT
($selector, $parent): $selector is the YSelectionWidget; $parent is the replacepoint's parent
DESCRIPTION
builds the YDumbTab widget