1API(3) User Contributed Perl Documentation API(3)
2
3
4
6 use QWizard::API;
7
8 my $primaries =
9 (
10 qw_primary('aprim', 'My title', 'An introduction',
11 [ qw_text('textresult', 'Enter something'),
12 qw_checkbox('checkresult', 'display results?', 1, 0)]);
13 # ...
14 );
15
17 QWizard::API is a wrapper around generating questions for use within a
18 QWizard question set. Functionally, the only reason for doing this is
19 to use an API instead of hand-encoding HASH and ARRAY structures. The
20 result might be slightly less verbose, however, since the tags can be
21 left off (I.E, name => 'something' becomes just 'something').
22
24 All of the APIs mentioned here take additional arguments at the end
25 which can be other hash pairs passed to the created objects beyond the
26 defaults that the APIs create.
27
28 Primary creation To create a primary: qw_primary(name, title, introduc‐
29 tion, [questions], [post_answers], [actions])
30
31 Widget creation
32
33 Text entry:
34 qw_text(name, question text);
35 qw_textbox(name, question text);
36
37 Chekboxes:
38 qw_checkbox(name, question text, optional:onval, optional:offval);
39
40 Menus/radios:
41 qw_menu(name, question text, [values] ⎪ {labels});
42 qw_radio(name, question text, [values] ⎪ {labels});
43
44 Labels:
45 qw_label(lefttext, righttext);
46 qw_paragraph(lefttext, rightparagraph);
47
48 Hidden vars:
49 qw_hidden(name, value);
50
51 Buttons:
52 qw_button(name, question text, clicked value, button label);
53
55 OO interface.
56
58 qw_primary
59 qw_text
60 qw_textbox
61 qw_checkbox
62 qw_radio
63 qw_menu
64
66 Wes Hardaker <hardaker@tislabs.com>
67
69 perl(1).
70
71
72
73perl v5.8.8 2008-04-17 API(3)