Revision dd1ab30b
Von Sven Schöling vor etwa 8 Jahren hinzugefügt
SL/Layout/ActionBar/Action.pm | ||
---|---|---|
sub from_descriptor {
|
||
my ($class, $descriptor) = @_;
|
||
require SL::Layout::ActionBar::Separator;
|
||
require SL::Layout::ActionBar::ComboBox;
|
||
|
||
{
|
||
return {
|
||
separator => SL::Layout::ActionBar::Separator->new,
|
||
} or die 'unknown descriptor';
|
||
combobox => SL::Layout::ActionBar::ComboBox->new,
|
||
}->{$descriptor} or die 'unknown descriptor';
|
||
}
|
||
|
||
# TODO: this necessary?
|
||
... | ... | |
return SL::Layout::ActionBar::ScriptButton->new(text => $text, params => \%params);
|
||
}
|
||
|
||
if ($params{combobox}) {
|
||
|
||
if ($params{actions}) {
|
||
require SL::Layout::ActionBar::ComboBox;
|
||
return SL::Layout::ActionBar::ComboBox->new(text => $text, %params);
|
||
}
|
||
}
|
||
|
Auch abrufbar als: Unified diff
ActionBar: by_description gefixt