… | |
… | |
704 | |
704 | |
705 | $child->set_parent ($self); |
705 | $child->set_parent ($self); |
706 | $self->{children}[$y][$x] = $child; |
706 | $self->{children}[$y][$x] = $child; |
707 | |
707 | |
708 | $self->{w} = $self->{h} = -1; |
708 | $self->{w} = $self->{h} = -1; |
|
|
709 | $self->update; |
|
|
710 | } |
|
|
711 | |
|
|
712 | # TODO: move to container class maybe? send childs a signal on removal? |
|
|
713 | sub clear { |
|
|
714 | my ($self) = @_; |
|
|
715 | |
|
|
716 | delete $self->{children}; |
709 | $self->update; |
717 | $self->update; |
710 | } |
718 | } |
711 | |
719 | |
712 | sub get_wh { |
720 | sub get_wh { |
713 | my ($self) = @_; |
721 | my ($self) = @_; |