Derived - Online Linux Manual Page
Section : 3pm
Updated : 2020-11-09
Source : perl v5.32.0
Note : User Contributed Perl Documentation
NAMETk::Derived − Base class for widgets derived from others
SYNOPSIS package Tk::MyNewWidget;
use Tk::widgets qw/ BaseWidget, list of Tk widgets /;
use base qw/ Tk::Derived Tk::BaseWidget /;
Construct Tk::Widget 'MyNewWidget';
sub ClassInit {
my( $class, $mw ) = @_;
#... e.g., class bindings here ...
$class−>SUPER::ClassInit( $mw );
}
sub Populate {
my( $self, $args ) = @_;
my $flag = delete $args−>{−flag};
if( defined $flag ) {
# handle −flag => xxx which can only be done at create
# time the delete above ensures that new() does not try
# and do $self−>configure( −flag => xxx );
}
$self−>SUPER::Populate( $args );
$self = $self−>Component( ... );
$self−>Delegates( ... );
$self−>ConfigSpecs(
'−cursor' => [ SELF, 'cursor', 'Cursor', undef ],
'−something' => [ METHOD, dbName, dbClass, default ],
'−text' => [ $label, dbName, dbClass, default ],
'−heading' => [ {−text => $head},
heading, Heading, 'My Heading' ],
);
}
sub something {
my( $self, $value) = @_;
if ( @_ > 1 ) {
# set it
}
return # current value
}
DESCRIPTIONTk::Derived is used with Perl's multiple inheritance to override some methods normally inherited from Tk::Widget. Tk::Derived should precede any Tk widgets in the class's base class definition. Tk::Derived's main purpose is to apply wrappers to configure and 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 Populate method provided by Tk::Derived and call ConfigSpecs to declare configure options. The public methods provided by Tk::Derived are as follows: −>ConfigSpecs(−key => [kind, name, Class, default], ...)
SEE ALSOTk::ConfigSpecs Tk::mega Tk::composite 0
Johanes Gumabo
Data Size : 7,536 byte
man-Tk::Derived.3pmBuild : 2025-03-22, 13:26 :
Visitor Screen : x
Visitor Counter ( page / site ) : 12 / 1,208,812
Visitor ID : :
Visitor IP : 3.15.198.40 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 25.03.22
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.
ERROR : Need New Coding : (parse_manual_page_|254|Tk::Derived.3pm|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\|
) (htmlprn|160|Tk::Derived.3pm|36/37|.el══─{─══. ds -- — |.el══─{─══. ds -- \|\(em\|
) (parse_manual_page_|254|Tk::Derived.3pm|43|br══─}─══|'br══─}─══
) (htmlprn|160|Tk::Derived.3pm|43|'br══─}─══ |'br══─}─══
)