SYNOPSIS

DESCRIPTION

The Tkx::MegaConfig class provide implementations of m_configure() and m_cget() that can handle configuration options for megawidgets. How these methods behave is set up by calling the _Config() class method. The _Config() method takes a set option/option spec pairs as argument.

An option argument is either the name of an option with leading '-' or the string 'DEFAULT' if this spec applies to all option with no explict spec.

If there is no 'DEFAULT' then unmatched options are applied directly to the megawidget root itself. This is the same behaviour you get if you specify:

__PACKAGE__->_Config(
...
DEFAULT => ['.'],
);

The option spec should be an array reference. The first element of the array ($where) describe how this option is handled. Some $where specs take arguments. If you need to provide argument replace $where with an array reference containg [$where, @args]. The rest of the option spec specify names and default for the options database, but is currently ignored (feature unimplemented).

The following $where specs are understood:

.foo

Delegate the given configuration option to the "foo" kid of the mega widget root. The name "." can be used to delegate to the megawidget root itself. The name ".*" can be used to delegate to all kids of the megawidget root.

An argument can be given to delegate using a different configuration name name on the "foo" widget. Examples:

Call the _config_opt method. For m_cget() no arguments are given, while for m_configure() the new value is passed. If an extra $where argument is given it will be the method called instead of _config_opt. Examples: