HOT DOG Linux


How To Show A Radio Button Dialog

From the shell, run the command:
$ hotdog radio OK Cancel "This is a radio button dialog." tag1 0 "Option 1" tag2 0 "Option 2" tag3 1 "Option 3"

The second argument contains the text for the OK button.

The third argument contains the text for the Cancel button.

The fourth argument contains the text for the dialog.

The rest of the arguments are interpreted in groups of 3. Each group represents a radio button.

The first argument in the group is a tag name for the radio button. This will be printed when the radio button is selected and the OK button is clicked.

The second argument in the group indicates whether or not the radio button is selected when the dialog first opens.

The third argument in the group is the text for the radio button. This will be displayed next to the radio button.


The style of dialog will be determined by the environment variable HOTDOG_MODE.

To force a dialog to be in a specific style:

$ HOTDOG_MODE="amiga" hotdog radio OK Cancel "This is a radio button dialog." tag1 0 "Option 1" tag2 0 "Option 2" tag3 1 "Option 3"

$ HOTDOG_MODE="macclassic" hotdog radio OK Cancel "This is a radio button dialog." tag1 0 "Option 1" tag2 0 "Option 2" tag3 1 "Option 3"

$ HOTDOG_MODE="aqua" hotdog radio OK Cancel "This is a radio button dialog." tag1 0 "Option 1" tag2 0 "Option 2" tag3 1 "Option 3"

If the user clicks the OK button, then the tag name for the currently selected radio button will be written to STDOUT, and the exit code will be 0.

If the user clicks the Cancel button or the user closes the dialog, possibly by clicking the window close button or hitting the Escape key, then nothing will be written to STDOUT, and the exit code will be 1.