Hobocamp::Dialog - Perl access to dialog(1)s widget set
version 0.600
use Hobocamp::Dialog; Hobocamp::Dialog::init(*STDIN, *STDOUT); my $widget = Hobocamp::Menu->new( 'items' => [ { 'name' => 'item 1', 'text' => 'thing 1' }, { 'name' => 'item 2', 'text' => 'thing 2' }], 'list_height' => 5, 'title' => 'A simple menu', 'prompt' => 'Choose one' ); $widget->run; # skipped checking returned dialog code for brevity print 'You chose: ', $widget->value->{'name'};
Hobocamp::Dialog is a direct interface to dialog(1). It does almost a one to one mapping as defined in dialog.h.
dialog_form, dialog_gauge, dialog_mixedform, dialog_mixedgauge, dialog_progressbox, dialog_tailbox
dialog_calendar($title, $subtitle, $height, $width, $day, $month, $year)
Defaults: $day = 1, $month = 1, $year = 1970
$day = 1
$month = 1
$year = 1970
Widget: Hobocamp::Calendar
dialog_checklist($title, $prompt, $height, $width, $list_height, [ { name = $name, text => $text, on => $bool }, ... ])>
dialog_checklist($title, $prompt, $height, $width, $list_height, [ { name =
Defaults: $list_height = 1
$list_height = 1
Widget: Hobocamp::CheckList
dialog_dselect($title, $path, $height, $width)
Widget: Hobocamp::DirectorySelect
dialog_editbox($title, $file, $height, $width)
Widget: Hobocamp::EditBox
dialog_fselect($title, $path, $height, $width)
Widget: Hobocamp::FileSelect
dialog_inputbox($title, $prompt, $height, $width, $initial_text, $password_field_or_not)
Widget: Hobocamp::InputBox
dialog_menu($title, $prompt, $height, $width, $menu_height, [ { name = $name, text => $text }, ... ])>
dialog_menu($title, $prompt, $height, $width, $menu_height, [ { name =
Defaults: $menu_height = 1
$menu_height = 1
Widget: Hobocamp::Menu
dialog_msgbox($title, $title, $height, $width, $pause_or_not)
Defaults: $pause_or_not = 1
$pause_or_not = 1
Widget: Hobocamp::MessageBox
dialog_pause($title, $prompt, $height, $width, $seconds)
Defaults: $seconds = 10
$seconds = 10
Widget: Hobocamp::Pause
dialog_textbox($title, $file, $height, $width)
Widget: Hobocamp::TextBox
dialog_radiolist($title, $prompt, $height, $width, $list_height, [ { name = $name, text => $text, on => $bool }, ... ])>
dialog_radiolist($title, $prompt, $height, $width, $list_height, [ { name =
Widget: Hobocamp::RadioList
dialog_timebox($title, $subtitle, $height, $width, $hour, $minute, $second)
Defaults: $hour = 12, $minute = 0, $second = 0
$hour = 12
$minute = 0
$second = 0
Widget: Hobocamp::TimeBox
dialog_yesno($title, $prompt, $height, $width)
Widget: Hobocamp::YesNo
init destroy dialog_version dlg_clr_result dlg_put_backtitle
These correspond to what is in dialog.h.
DLG_EXIT_CANCEL DLG_EXIT_ERROR DLG_EXIT_ESC DLG_EXIT_EXTRA DLG_EXIT_HELP DLG_EXIT_ITEM_HELP DLG_EXIT_OK DLG_EXIT_UNKNOWN
_dialog_result _dialog_set_backtitle
dialog(1), dialog.h
Adam Flott <adam@npjh.com>
This software is copyright (c) 2011 by Adam Flott <adam@npjh.com>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Hobocamp, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Hobocamp
CPAN shell
perl -MCPAN -e shell install Hobocamp
For more information on module installation, please visit the detailed CPAN module installation guide.