… | |
… | |
4057 | sub pages { |
4057 | sub pages { |
4058 | my ($self) = @_; |
4058 | my ($self) = @_; |
4059 | $self->{multiplexer}->children |
4059 | $self->{multiplexer}->children |
4060 | } |
4060 | } |
4061 | |
4061 | |
|
|
4062 | sub page_index { |
|
|
4063 | my ($self, $widget) = @_; |
|
|
4064 | |
|
|
4065 | my $i = 0; |
|
|
4066 | for ($self->pages) { |
|
|
4067 | if ($_ eq $widget) { return $i }; |
|
|
4068 | $i++; |
|
|
4069 | } |
|
|
4070 | |
|
|
4071 | undef |
|
|
4072 | } |
|
|
4073 | |
4062 | sub add_tab { |
4074 | sub add_tab { |
4063 | my ($self, $title, $widget, $tooltip) = @_; |
4075 | my ($self, $title, $widget, $tooltip) = @_; |
4064 | |
4076 | |
4065 | $title = [$title, $tooltip] unless ref $title; |
4077 | $title = [$title, $tooltip] unless ref $title; |
4066 | $widget->{c_tab} = $title; |
4078 | $widget->{c_tab} = $title; |