~ubuntu-branches/ubuntu/wily/libui-dialog-perl/wily

« back to all changes in this revision

Viewing changes to .pc/FixSpellingAndManDescription.diff/lib/UI/Dialog/Backend/Zenity.pod

  • Committer: Package Import Robot
  • Author(s): Alejandro Garrido Mota
  • Date: 2013-08-10 17:03:03 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20130810170303-z23sxbboezqbjcas
Tags: 1.09-1
* New upstream release. 
* Add watch file.
* d/control:
  - Update Standards-Version to 3.9.4
  - Add Vcs-Git and Vcs-Browser.  
* Add source-format 3.0.
* d/copyright:
  - Update to copyright-format 1.0.
  - Push copyright years.
* Update d/rules to dh.
* Remove docs file.
* Add d/libui-dialog-perl.examples file
* Add FixPod2manErrors.diff and FixSpellingAndManDescription.diff patches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
=head1 NAME
 
2
 
 
3
UI::Dialog::Backend::Zenity
 
4
 
 
5
=head1 SYNOPSIS
 
6
 
 
7
  use UI::Dialog::Backend::Zenity;
 
8
  my $d = new UI::Dialog::Backend::Zenity ( backtitle => 'Demo',
 
9
                                            title => 'Default' );
 
10
 
 
11
  $d->msgbox( title => 'Welcome!', text => 'Welcome one and all!' );
 
12
 
 
13
=head1 ABSTRACT
 
14
 
 
15
Zenity is the speedy, slick, and ultimately cool GTK2 dialog variant that is
 
16
destined to obselete the current GNOME dialog variant; GDialog. This is an
 
17
OOPerl wrapper of the Zenity application.
 
18
 
 
19
=head1 DESCRIPTION
 
20
 
 
21
UI::Dialog::Backend::Zenity is the UI::Dialog backend for the new GNOME
 
22
dialog variant. While this module is used through UI::Dialog or any other loader
 
23
module only the compatible methods are ever accessible. However, when using
 
24
this module directly in your application (as in the SYNOPSIS example) you are
 
25
given access to all the options and features of the real zenity(1) application.
 
26
 
 
27
=head1 EXPORT
 
28
 
 
29
=over 2
 
30
 
 
31
None
 
32
 
 
33
=back
 
34
 
 
35
=head1 INHERITS
 
36
 
 
37
=over 2
 
38
 
 
39
UI::Dialog::Backend
 
40
 
 
41
=back
 
42
 
 
43
=head1 CONSTRUCTOR
 
44
 
 
45
=head2 new( @options )
 
46
 
 
47
=over 4
 
48
 
 
49
=item EXAMPLE
 
50
 
 
51
=over 6
 
52
 
 
53
 my $d = new( title => 'Default Title', backtitle => 'Backtitle',
 
54
              width => 65, height => 20, listheight => 5 );
 
55
 
 
56
=back
 
57
 
 
58
=item DESCRIPTION
 
59
 
 
60
=over 6
 
61
 
 
62
This is the Class Constructor method. It accepts a list of key => value pairs
 
63
and uses them as the defaults when interacting with the various widgets.
 
64
 
 
65
=back
 
66
 
 
67
=item RETURNS
 
68
 
 
69
=over 6
 
70
 
 
71
A blessed object reference of the UI::Dialog::Backend::Zenity class.
 
72
 
 
73
=back
 
74
 
 
75
=item OPTIONS
 
76
 
 
77
The (...)'s after each option indicate the default for the option. An * denotes
 
78
support by all the widget methods on a per-use policy defaulting to the values
 
79
decided during object creation.
 
80
 
 
81
=over 6
 
82
 
 
83
=item B<debug = 0,1,2> (0)
 
84
 
 
85
=item B<literal = 0,1> (0)
 
86
 
 
87
=item B<backtitle = "backtitle"> ('') *
 
88
 
 
89
=item B<title = "title"> ('') *
 
90
 
 
91
=item B<height = \d+> (0) *
 
92
 
 
93
=item B<width = \d+> (0) *
 
94
 
 
95
=item B<display = ":0"> ('') *
 
96
 
 
97
=item B<name = "wmname"> ('') *
 
98
 
 
99
=item B<class = "wmclass"> ('') *
 
100
 
 
101
=item B<beepbin = "/usr/bin/beep"> ('')
 
102
 
 
103
=item B<beepbefore = 0,1> (0) *
 
104
 
 
105
=item B<beepafter = 0,1> (0) *
 
106
 
 
107
=back
 
108
 
 
109
=back
 
110
 
 
111
=head1 WIDGET METHODS
 
112
 
 
113
=head2 yesno( ) question( )
 
114
 
 
115
=over 4
 
116
 
 
117
=item EXAMPLE
 
118
 
 
119
=over 6
 
120
 
 
121
 if ($d->yesno( text => 'A binary type question?') ) {
 
122
     # user pressed yes
 
123
 } else {
 
124
     # user pressed no or cancel
 
125
 }
 
126
 
 
127
=back
 
128
 
 
129
=item DESCRIPTION
 
130
 
 
131
=over 6
 
132
 
 
133
Present the end user with a message box that has two buttons, OK and CANCEL
 
134
(aka: Yes and No). yesno() is a wrapper for question().
 
135
 
 
136
=back
 
137
 
 
138
=item RETURNS
 
139
 
 
140
=over 6
 
141
 
 
142
TRUE (1) for a response of YES or FALSE (0) for anything else.
 
143
 
 
144
=back
 
145
 
 
146
=back
 
147
 
 
148
=head2 msgbox( )
 
149
 
 
150
=over 4
 
151
 
 
152
=item EXAMPLE
 
153
 
 
154
=over 6
 
155
 
 
156
 $d->msgbox( text => 'A simple message' );
 
157
 
 
158
=back
 
159
 
 
160
=item DESCRIPTION
 
161
 
 
162
=over 6
 
163
 
 
164
Pesent the end user with a message box that has an OK button.
 
165
 
 
166
=back
 
167
 
 
168
=item RETURNS
 
169
 
 
170
=over 6
 
171
 
 
172
TRUE (1) for a response of OK or FALSE (0) for anything else.
 
173
 
 
174
=back
 
175
 
 
176
=back
 
177
 
 
178
=head2 password( )
 
179
 
 
180
=over 4
 
181
 
 
182
=item EXAMPLE
 
183
 
 
184
=over 6
 
185
 
 
186
 my $string = $d->password( text => 'Enter some (hidden) text.' );
 
187
 
 
188
=back
 
189
 
 
190
=item DESCRIPTION
 
191
 
 
192
=over 6
 
193
 
 
194
Present the end user with a text input field that doesn't reveal the input
 
195
(except to the script) and a message.
 
196
 
 
197
=back
 
198
 
 
199
=item RETURNS
 
200
 
 
201
=over 6
 
202
 
 
203
a SCALAR if the response is OK and FALSE (0) for anything else.
 
204
 
 
205
=back
 
206
 
 
207
=back
 
208
 
 
209
=head2 inputbox( )
 
210
 
 
211
=over 4
 
212
 
 
213
=item EXAMPLE
 
214
 
 
215
=over 6
 
216
 
 
217
 my $string = $d->inputbox( text => 'Please enter some text...',
 
218
                            entry => 'this is the input field' );
 
219
 
 
220
=back
 
221
 
 
222
=item DESCRIPTION
 
223
 
 
224
=over 6
 
225
 
 
226
Present the end user with a text input field and a message.
 
227
 
 
228
=back
 
229
 
 
230
=item RETURNS
 
231
 
 
232
=over 6
 
233
 
 
234
a SCALAR if the response is OK and FALSE (0) for anything else.
 
235
 
 
236
=back
 
237
 
 
238
=back
 
239
 
 
240
=head2 textbox( )
 
241
 
 
242
=over 4
 
243
 
 
244
=item EXAMPLE
 
245
 
 
246
=over 6
 
247
 
 
248
 $d->textbox( path => '/path/to/a/text/file' );
 
249
 
 
250
=back
 
251
 
 
252
=item DESCRIPTION
 
253
 
 
254
=over 6
 
255
 
 
256
Present the end user with a simple scrolling box containing the contents
 
257
of the given text file.
 
258
 
 
259
=back
 
260
 
 
261
=item RETURNS
 
262
 
 
263
=over 6
 
264
 
 
265
TRUE (1) if the response is OK and FALSE (0) for anything else.
 
266
 
 
267
=back
 
268
 
 
269
=back
 
270
 
 
271
=head2 editbox( )
 
272
 
 
273
=over 4
 
274
 
 
275
=item EXAMPLE
 
276
 
 
277
=over 6
 
278
 
 
279
 $d->editbox( path => '/path/to/a/text/file' );
 
280
 
 
281
=back
 
282
 
 
283
=item DESCRIPTION
 
284
 
 
285
=over 6
 
286
 
 
287
Present the end user with an editable textbox containing the contents
 
288
of the given text file.
 
289
 
 
290
=back
 
291
 
 
292
=item RETURNS
 
293
 
 
294
=over 6
 
295
 
 
296
A SCALAR containing the edited text if the response is OK and FALSE (0)
 
297
for anything else.
 
298
 
 
299
=back
 
300
 
 
301
=back
 
302
 
 
303
=head2 menu( )
 
304
 
 
305
=over 4
 
306
 
 
307
=item EXAMPLE
 
308
 
 
309
=over 6
 
310
 
 
311
 my $selection1 = $d->menu( text => 'Select one:',
 
312
                            list => [ 'tag1', 'item1',
 
313
                                      'tag2', 'item2',
 
314
                                      'tag3', 'item3' ] );
 
315
 
 
316
=back
 
317
 
 
318
=item DESCRIPTION
 
319
 
 
320
=over 6
 
321
 
 
322
Present the user with a selectable list.
 
323
 
 
324
=back
 
325
 
 
326
=item RETURNS
 
327
 
 
328
=over 6
 
329
 
 
330
a SCALAR of the chosen tag if the response is OK and FALSE (0) for
 
331
anything else.
 
332
 
 
333
=back
 
334
 
 
335
=back
 
336
 
 
337
=head2 checklist( )
 
338
 
 
339
=over 4
 
340
 
 
341
=item EXAMPLE
 
342
 
 
343
=over 6
 
344
 
 
345
 my @selection = $d->checklist( text => 'Select one:',
 
346
                                list => [ 'tag1', [ 'item1', 0 ],
 
347
                                          'tag2', [ 'item2', 1 ],
 
348
                                          'tag3', [ 'item3', 1 ] ]
 
349
                              );
 
350
 
 
351
=back
 
352
 
 
353
=item DESCRIPTION
 
354
 
 
355
=over 6
 
356
 
 
357
Present the user with a selectable checklist.
 
358
 
 
359
=back
 
360
 
 
361
=item RETURNS
 
362
 
 
363
=over 6
 
364
 
 
365
an ARRAY of the chosen tags if the response is OK and FALSE (0) for
 
366
anything else.
 
367
 
 
368
=back
 
369
 
 
370
=back
 
371
 
 
372
=head2 radiolist( )
 
373
 
 
374
=over 4
 
375
 
 
376
=item EXAMPLE
 
377
 
 
378
=over 6
 
379
 
 
380
 my $selection = $d->radiolist( text => 'Select one:',
 
381
                                list => [ 'tag1', [ 'item1', 0 ],
 
382
                                          'tag2', [ 'item2', 1 ],
 
383
                                          'tag3', [ 'item3', 0 ] ]
 
384
                              );
 
385
 
 
386
=back
 
387
 
 
388
=item DESCRIPTION
 
389
 
 
390
=over 6
 
391
 
 
392
Present the user with a selectable radiolist.
 
393
 
 
394
=back
 
395
 
 
396
=item RETURNS
 
397
 
 
398
=over 6
 
399
 
 
400
a SCALAR of the chosen tag if the response is OK and FALSE (0) for
 
401
anything else.
 
402
 
 
403
=back
 
404
 
 
405
=back
 
406
 
 
407
=head2 fselect( )
 
408
 
 
409
=over 4
 
410
 
 
411
=item EXAMPLE
 
412
 
 
413
=over 6
 
414
 
 
415
 my $text = $d->fselect( path => '/path/to/a/file/or/directory' );
 
416
 
 
417
=back
 
418
 
 
419
=item DESCRIPTION
 
420
 
 
421
=over 6
 
422
 
 
423
Present the user with a file selection widget preset with the given path.
 
424
 
 
425
=back
 
426
 
 
427
=item RETURNS
 
428
 
 
429
=over 6
 
430
 
 
431
a SCALAR if the response is OK and FALSE (0) for anything else.
 
432
 
 
433
=back
 
434
 
 
435
=back
 
436
 
 
437
=head2 dselect( )
 
438
 
 
439
=over 4
 
440
 
 
441
=item EXAMPLE
 
442
 
 
443
=over 6
 
444
 
 
445
 my $text = $d->dselect( path => '/path/to/a/directory' );
 
446
 
 
447
=back
 
448
 
 
449
=item DESCRIPTION
 
450
 
 
451
=over 6
 
452
 
 
453
Present the user with a file selection widget preset with the given path.
 
454
Unlike fselect() this widget will only return a directory selection.
 
455
 
 
456
=back
 
457
 
 
458
=item RETURNS
 
459
 
 
460
=over 6
 
461
 
 
462
a SCALAR if the response is OK and FALSE (0) for anything else.
 
463
 
 
464
=back
 
465
 
 
466
=back
 
467
 
 
468
=head2 calendar( )
 
469
 
 
470
=over 4
 
471
 
 
472
=item EXAMPLE
 
473
 
 
474
=over 6
 
475
 
 
476
 my $date = $d->calendar( day => 10, month => 10, year => 1977,
 
477
                          'date-format' => '%d/%m/%y' );
 
478
 
 
479
=back
 
480
 
 
481
=item DESCRIPTION
 
482
 
 
483
=over 6
 
484
 
 
485
Present the user with a calendar so that they may select a date. The
 
486
'date-format' option follows the same format definition as the date(1)
 
487
command line program. If the day, month and year options are not provided,
 
488
the widget defaults to the current date. The default format for the
 
489
date string is '%d/%m/%y' which breaks down to: "dd/mm/yy".
 
490
 
 
491
=back
 
492
 
 
493
=item RETURNS
 
494
 
 
495
=over 6
 
496
 
 
497
a SCALAR if the response is OK and FALSE (0) for anything else.
 
498
 
 
499
=back
 
500
 
 
501
=back
 
502
 
 
503
=head2 gauge_start( )
 
504
 
 
505
=over 4
 
506
 
 
507
=item EXAMPLE
 
508
 
 
509
=over 6
 
510
 
 
511
 $d->gauge_start( text => 'gauge...', percentage => 1 );
 
512
 
 
513
=back
 
514
 
 
515
=item DESCRIPTION
 
516
 
 
517
=over 6
 
518
 
 
519
Display a meter bar to the user. This get's the widget realized but requires
 
520
the use of the other gauge_*() methods for functionality.
 
521
 
 
522
=back
 
523
 
 
524
=item RETURNS
 
525
 
 
526
=over 6
 
527
 
 
528
TRUE (1) if the widget loaded fine and FALSE (0) for anything else.
 
529
 
 
530
=back
 
531
 
 
532
=back
 
533
 
 
534
=head2 gauge_inc( )
 
535
 
 
536
=over 4
 
537
 
 
538
=item EXAMPLE
 
539
 
 
540
=over 6
 
541
 
 
542
 $d->gauge_inc( 1 );
 
543
 
 
544
=back
 
545
 
 
546
=item DESCRIPTION
 
547
 
 
548
=over 6
 
549
 
 
550
Increment the meter by the given amount.
 
551
 
 
552
=back
 
553
 
 
554
=item RETURNS
 
555
 
 
556
=over 6
 
557
 
 
558
TRUE (1) if the widget incremented fine and FALSE (0) for anything else.
 
559
 
 
560
=back
 
561
 
 
562
=back
 
563
 
 
564
=head2 gauge_dec( )
 
565
 
 
566
=over 4
 
567
 
 
568
=item EXAMPLE
 
569
 
 
570
=over 6
 
571
 
 
572
 $d->gauge_dec( 1 );
 
573
 
 
574
=back
 
575
 
 
576
=item DESCRIPTION
 
577
 
 
578
=over 6
 
579
 
 
580
Decrement the meter by the given amount.
 
581
 
 
582
=back
 
583
 
 
584
=item RETURNS
 
585
 
 
586
=over 6
 
587
 
 
588
TRUE (1) if the widget incremented fine and FALSE (0) for anything else.
 
589
 
 
590
=back
 
591
 
 
592
=back
 
593
 
 
594
=head2 gauge_set( )
 
595
 
 
596
=over 4
 
597
 
 
598
=item EXAMPLE
 
599
 
 
600
=over 6
 
601
 
 
602
 $d->gauge_set( 99 );
 
603
 
 
604
=back
 
605
 
 
606
=item DESCRIPTION
 
607
 
 
608
=over 6
 
609
 
 
610
Set the meter bar to the given amount.
 
611
 
 
612
=back
 
613
 
 
614
=item RETURNS
 
615
 
 
616
=over 6
 
617
 
 
618
TRUE (1) if the widget set fine and FALSE (0) for anything else.
 
619
 
 
620
=back
 
621
 
 
622
=back
 
623
 
 
624
=head2 gauge_stop( )
 
625
 
 
626
=over 4
 
627
 
 
628
=item EXAMPLE
 
629
 
 
630
=over 6
 
631
 
 
632
 $d->gauge_stop();
 
633
 
 
634
=back
 
635
 
 
636
=item DESCRIPTION
 
637
 
 
638
=over 6
 
639
 
 
640
End the meter bar widget process.
 
641
 
 
642
=back
 
643
 
 
644
=item RETURNS
 
645
 
 
646
=over 6
 
647
 
 
648
TRUE (1) if the widget closed fine and FALSE (0) for anything else.
 
649
 
 
650
=back
 
651
 
 
652
=back
 
653
 
 
654
=head1 SEE ALSO
 
655
 
 
656
=over 2
 
657
 
 
658
=item PERLDOC
 
659
 
 
660
 UI::Dialog
 
661
 UI::Dialog::GNOME
 
662
 UI::Dialog::Backend
 
663
 UI::Dialog::Backend::Nautilus
 
664
 UI::Dialog::Backend::XOSD
 
665
 
 
666
=back
 
667
 
 
668
=over 2
 
669
 
 
670
=item MAN FILES
 
671
 
 
672
zenity(1)
 
673
 
 
674
=back
 
675
 
 
676
=head1 BUGS
 
677
 
 
678
Please email the author with any bug reports. Include the name of the
 
679
module in the subject line.
 
680
 
 
681
=head1 AUTHOR
 
682
 
 
683
Kevin C. Krinke, E<lt>kevin@krinke.caE<gt>
 
684
 
 
685
=head1 COPYRIGHT AND LICENSE
 
686
 
 
687
 Copyright (C) 2013  Kevin C. Krinke <kevin@krinke.ca>
 
688
 
 
689
 This library is free software; you can redistribute it and/or
 
690
 modify it under the terms of the GNU Lesser General Public
 
691
 License as published by the Free Software Foundation; either
 
692
 version 2.1 of the License, or (at your option) any later version.
 
693
 
 
694
 This library is distributed in the hope that it will be useful,
 
695
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 
696
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
697
 Lesser General Public License for more details.
 
698
 
 
699
 You should have received a copy of the GNU Lesser General Public
 
700
 License along with this library; if not, write to the Free Software
 
701
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 
702
 
 
703
=cut