The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Config::Model::TkUI - Perl/Tk widget to edit content of Config::Model

SYNOPSIS

 use Config::Model::TkUI;

 # init trace
 Log::Log4perl->easy_init($WARN);

 # create configuration instance
 my $model = Config::Model -> new ;
 my $inst = $model->instance (root_class_name => 'a_config_class',
                              instance_name   => 'test');
 my $root = $inst -> config_root ;

 # Tk part
 my $mw = MainWindow-> new ;
 $mw->withdraw ;
 $mw->ConfigModelUI (-root => $root) ;

 MainLoop ;

DESCRIPTION

This class provides a GUI for Config::Model.

With this class, Config::Model and an actual configuration model (like Config::Model::Xorg), you get a tool to edit configuration files (e.g. /etc/X11/xorg.conf).

USAGE

Left side tree

  • Click on '+' and '-' boxes to open or close content

  • Left-click on item to open a viewer widget.

  • Right-click on any item to open an editor widget

Editor widget

When clicking on store, the new data is stored in the tree represented on the left side of TkUI. The new data will be stored in the configuration file only when File-save> menu is invoked.

TODO

Document widget options. (-root_model and -store_sub)

AUTHOR

Dominique Dumont, (ddumont at cpan dot org)

SEE ALSO

Config::Model