| 1 | # Copyright 2007, 2008, 2009, 2010, 2011 Kevin Ryde | ||
| 2 | |||
| 3 | # This file is part of Chart. | ||
| 4 | # | ||
| 5 | # Chart is free software; you can redistribute it and/or modify | ||
| 6 | # it under the terms of the GNU General Public License as published by the | ||
| 7 | # Free Software Foundation; either version 3, or (at your option) any later | ||
| 8 | # version. | ||
| 9 | # | ||
| 10 | # Chart is distributed in the hope that it will be useful, but | ||
| 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
| 12 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
| 13 | # for more details. | ||
| 14 | # | ||
| 15 | # You should have received a copy of the GNU General Public License along | ||
| 16 | # with Chart. If not, see <http://www.gnu.org/licenses/>. | ||
| 17 | |||
| 18 | package App::Chart::Gtk2::Ex::TreePath::Subclass; | ||
| 19 | use 5.008; | ||
| 20 | use strict; | ||
| 21 | use warnings; | ||
| 22 | use Gtk2; | ||
| 23 | |||
| 24 | # not "use base 'Gtk2::TreePath'" here because base.pm complains that | ||
| 25 | # Gtk2::TreePath is empty -- until it's autoloaded or something, presumably | ||
| 26 | our @ISA = ('Gtk2::TreePath'); | ||
| 27 | |||
| 28 | sub new { | ||
| 29 | my $class = shift; | ||
| 30 | my $self = $class->SUPER::new (@_); | ||
| 31 | return bless $self, $class; # rebless | ||
| 32 | } | ||
| 33 | sub new_first { | ||
| 34 | my $class = shift; | ||
| 35 | my $self = $class->SUPER::new_first (@_); | ||
| 36 | return bless $self, $class; # rebless | ||
| 37 | } | ||
| 38 | sub new_from_indices { | ||
| 39 | my $class = shift; | ||
| 40 | my $self = $class->SUPER::new_from_indices (@_); | ||
| 41 | return bless $self, $class; # rebless | ||
| 42 | } | ||
| 43 | sub new_from_string { | ||
| 44 | my $class = shift; | ||
| 45 | my $self = $class->SUPER::new_from_string (@_); | ||
| 46 | # can return undef if string is bad | ||
| 47 | return $self && bless $self, $class; # rebless | ||
| 48 | } | ||
| 49 | |||
| 50 | |||
| 51 | 1; | ||
| 52 | __END__ |