Dominique Dumont > Config-Model-TkUI > Config::Model::TkUI



Annotate this POD


View/Report Bugs
Module Version: 1.357   Source  


Config::Model::TkUI - Tk GUI to edit config data through Config::Model


 use Config::Model::TkUI;

 # init trace

 # 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 ;


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).


Left side tree


Hit Ctrl-F or use menu Edit -> Search to open a search widget at the bottom of the window.

Enter a keyword in the entry widget and click on Next button.

The keyword will be searched in the configuration tree, in element name, in element value and in documentation.

Editor widget

The right side of the widget is either a viewer or an editor. When clicking on store in the editor, 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.


A wizard can be launched either with File -> Wizard menu entry or with Run Wizard button.

The wizard will scan the configuration tree and stop on all items flagged as important in the model. It will also stop on all erroneous items (mostly missing mandatory values).

Methods ^


Save modified data in configuration file. The callback function is called only if the save was done without error. The callback is called with $@ in case of failed save.


- add tabular view ? - expand the whole tree at once - add plug-in mechanism so that dedicated widget can be used for some config Class (Could be handy for Xorg::ServerLayout)

More information ^

FEEDBACK and HELP wanted ^

This project needs feedback from its users. Please send your feedbacks, comments and ideas to :

  config-mode-users at

This projects also needs help to improve its user interfaces:

If you want to help, please send a mail to:

  config-mode-devel at


syntax highlighting: