The goal of the TLMP frameworks is to reduce your work. You work may be presented like this:
This is generally a small function. It receives an object GURUPATH_STATUS and fill the following field:
Is this dialog reachable ? Is it meaningful ?
The variable is set to true or false based on previous answers (previous dialogs). For example a node requesting the default gateway is useless if the user has selected dhcp to configure the network interface.
Are the value presented in the dialog already filled ?
If the values are filled, they are validated. The validation may be extensive. For example, a dialog requesting the default gateway may check the following things;
If this eval function is the last node of a row, you can use the "setterminal" function. This function expects two string arguments:
This is a short line which will be appended at the end of the row on the graphical map.
This is a paragraph shown (not yet, sorry) when the user move the mouse over one area of the map.
You must also use the settitle function to set the title of this node dialog. The settitle is used in the eval function because the title is collected to enhance the map presentation and build the node dialog. The settitle function expect a single string.
This function describes the dialog to present. It receives a DIALOG object called dia, so the dialog may contains any fields type found in a normal Linuxconf dialog.
Unlike a normal linuxconf dialog, this one expects a DIALOG::newline between fields as needed.
In the dialog function, you have access to few function controlling the presentation:
You pass the introduction text of the dialog here. This is generally several lines of explanation.
This triggers the presentation of the dialog. It returns true if the user has accepted the input (by hitting next). It returns false if the user escape away (hit the "back" button).
When edit returns true, you can validate the input. If they are wrong, you can present some errors (using xconf_error()) and call edit again.
This allows you to add extra buttons at the bottom of the dialog. If you do so, you will need a dobutton function.
This one is seldom used. If you need an extra button for a dialog (a probe button to configure a hardware component for example).
The dobutton function is passing the id (int id) you passed using the setbutinfo() function.