File: Derived.pod

package info (click to toggle)
perl-tk 1%3A800.015-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 17,636 kB
  • ctags: 18,270
  • sloc: ansic: 195,135; perl: 37,385; makefile: 4,380; sh: 2,286; yacc: 762
file content (55 lines) | stat: -rw-r--r-- 1,173 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55

=head1 NAME

Tk::Derived - Base class for widgets derived from others

=for pm Tk/Derived.pm

=for category Derived Widgets

=head1 SYNOPSIS

  package Tk::Whatever;
  require Tk::Something;
  require Tk::Derived;

  @ISA = qw(Tk::Derived Tk::Something);

  sub Populate
  {
   my ($cw,$args) = @_;
   ...
   $cw->SUPER::Populate($args);
   $cw->ConfigSpecs(...);
   ...
  }

=head1 DESCRIPTION

Tk::Derived is used with perl5's multiple inheritance to override some
methods normally inherited from Tk::Widget.

Tk::Derived should precede any Tk widgets in the class's @ISA.

Tk::Derived's main purpose is to apply wrappers to C<configure> and C<cget>
methods of widgets to allow the derived widget to add to or modify behaviour
of the configure options supported by the base widget.

The derived class should normally override the C<Populate> method provided
by Tk::Derived and call C<ConfigSpecs> to declare configure options.

The public methods provided by Tk::Derived are as follows:

=over 4

=item -E<gt>ConfigSpecs(-I<key> =E<gt> [I<kind>, I<name>, I<Class>, I<default], ...)

=back

=head1 SEE ALSO

L<Tk::ConfigSpecs|Tk::ConfigSpecs>
L<Tk::mega|Tk::mega>

=cut