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

NAME

Hobocamp::Dialog - Perl access to dialog(1)s widget set

VERSION

version 0.600

SYNOPSIS

    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'};

DESCRIPTION

Hobocamp::Dialog is a direct interface to dialog(1). It does almost a one to one mapping as defined in dialog.h.

MISSING WIDGETS

dialog_form, dialog_gauge, dialog_mixedform, dialog_mixedgauge, dialog_progressbox, dialog_tailbox

EXPORT

:widgets

  • dialog_calendar($title, $subtitle, $height, $width, $day, $month, $year)

    Defaults: $day = 1, $month = 1, $year = 1970

    Widget: Hobocamp::Calendar

  • dialog_checklist($title, $prompt, $height, $width, $list_height, [ { name = $name, text => $text, on => $bool }, ... ])>

    Defaults: $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 }, ... ])>

    Defaults: $menu_height = 1

    Widget: Hobocamp::Menu

  • dialog_msgbox($title, $title, $height, $width, $pause_or_not)

    Defaults: $pause_or_not = 1

    Widget: Hobocamp::MessageBox

  • dialog_pause($title, $prompt, $height, $width, $seconds)

    Defaults: $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 }, ... ])>

    Defaults: $list_height = 1

    Widget: Hobocamp::RadioList

  • dialog_timebox($title, $subtitle, $height, $width, $hour, $minute, $second)

    Defaults: $hour = 12, $minute = 0, $second = 0

    Widget: Hobocamp::TimeBox

  • dialog_yesno($title, $prompt, $height, $width)

    Widget: Hobocamp::YesNo

:util

  init
  destroy
  dialog_version
  dlg_clr_result
  dlg_put_backtitle

:constants

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

:extra

    _dialog_result
    _dialog_set_backtitle

SEE ALSO

AUTHOR

Adam Flott <adam@npjh.com>

COPYRIGHT AND LICENSE

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.