.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "UI::Dialog::Backend::XOSD 3pm" .TH UI::Dialog::Backend::XOSD 3pm "2018-10-27" "perl v5.26.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" UI::Dialog::Backend::XOSD \- backend for the osd_cat(1). .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 3 \& use UI::Dialog::Backend::XOSD; \& my $xosd = new UI::Dialog::Backend::XOSD (); \& $xosd\->line( text => "Something to display..."); .Ve .SH "ABSTRACT" .IX Header "ABSTRACT" UI::Dialog::Backend::XOSD is an OOPerl wrapper for the \fIosd_cat\fR\|(1) program. .SH "DESCRIPTION" .IX Header "DESCRIPTION" Use this module to present feedback to the end user via an on-screen display (like an on-screen \s-1TV\s0 volume meter). When you use any of the UI::Dialog meta classes (UI::Dialog, UI::Dialog::GNOME, etc.) access to this backend is provided via the \f(CW$d\fR\->xosd method. ie: replace \f(CW$xosd\fR with \f(CW$d\fR\->xosd in the synopsis example (provided you made \f(CW$d\fR with something like my \f(CW$d\fR = new UI::Dialog...). Also, UI::Dialog (and friends) only load this module when you first use the \f(CW$d\fR\->xosd method (this may silently fail, but you can test by \fIref()\fR for success). .SH "EXPORT" .IX Header "EXPORT" .RS 2 None .RE .SH "INHERITS" .IX Header "INHERITS" .RS 2 UI::Dialog::Backend .RE .SH "CONSTRUCTOR" .IX Header "CONSTRUCTOR" .ie n .SS "new( @options )" .el .SS "new( \f(CW@options\fP )" .IX Subsection "new( @options )" .IP "\s-1EXAMPLE\s0" 4 .IX Item "EXAMPLE" .RS 4 .Vb 1 \& my $xosd = new UI::Dialog::Backend::XOSD ( ); .Ve .RE .RS 4 .RE .IP "\s-1DESCRIPTION\s0" 4 .IX Item "DESCRIPTION" .RS 4 .RS 6 This is the Class Constructor method. It accepts a list of key => value pairs and uses them as the defaults when interacting with the various widgets. All methods accept the same arguments as \fInew()\fR except that the arguments passed to the methods are temporarily used instead of making them the default as the \&\fInew()\fR method does. In the case of the 'wait' option, any (non-zero) value enables the option as it's a switch and not a string argument. .RE .RE .RS 4 .RE .IP "\s-1RETURNS\s0" 4 .IX Item "RETURNS" .RS 4 .RS 6 A blessed object reference of the UI::Dialog::Backend::XOSD class. .RE .RE .RS 4 .RE .IP "\s-1OPTIONS\s0" 4 .IX Item "OPTIONS" The (...)'s after each option indicate the default for the option. An * denotes support by all the widget methods on a per-use policy defaulting to the values decided during object creation. .RS 4 .IP "\fBoffset = \ed+\fR (0) *" 6 .IX Item "offset = d+ (0) *" .PD 0 .IP "\fBalign = \ew+\fR ('left') *" 6 .IX Item "align = w+ ('left') *" .IP "\fBindent = \ed+\fR (0) *" 6 .IX Item "indent = d+ (0) *" .ie n .IP "\fBfont = ""x\-font-string""\fR ('fixed') *" 6 .el .IP "\fBfont = ``x\-font-string''\fR ('fixed') *" 6 .IX Item "font = x-font-string ('fixed') *" .IP "\fBcolour = \ew+\fR ('red') *" 6 .IX Item "colour = w+ ('red') *" .IP "\fBdelay = \ed+\fR (5) *" 6 .IX Item "delay = d+ (5) *" .IP "\fBlines = \ed+\fR (5) *" 6 .IX Item "lines = d+ (5) *" .IP "\fBshadow = \ed+\fR (0) *" 6 .IX Item "shadow = d+ (0) *" .IP "\fBage = \ed+\fR (0) *" 6 .IX Item "age = d+ (0) *" .IP "\fBwait = 0,1\fR (0) *" 6 .IX Item "wait = 0,1 (0) *" .RE .RS 4 .RE .PD .SH "METHODS" .IX Header "METHODS" .SS "line( )" .IX Subsection "line( )" .IP "\s-1EXAMPLE\s0" 4 .IX Item "EXAMPLE" .RS 4 .Vb 1 \& $xosd\->line( text => "some text to display" ); .Ve .RE .RS 4 .RE .IP "\s-1DESCRIPTION\s0" 4 .IX Item "DESCRIPTION" .RS 4 .RS 6 Display a simple string on the screen. .RE .RE .RS 4 .RE .IP "\s-1RETURNS\s0" 4 .IX Item "RETURNS" .RS 4 .RS 6 Nothing. .RE .RE .RS 4 .RE .SS "file( )" .IX Subsection "file( )" .IP "\s-1EXAMPLE\s0" 4 .IX Item "EXAMPLE" .RS 4 .Vb 1 \& $xosd\->file( file => "/path/to/a/file" ); .Ve .RE .RS 4 .RE .IP "\s-1DESCRIPTION\s0" 4 .IX Item "DESCRIPTION" .RS 4 .RS 6 Display a file on the screen. .RE .RE .RS 4 .RE .IP "\s-1RETURNS\s0" 4 .IX Item "RETURNS" .RS 4 .RS 6 Nothing. .RE .RE .RS 4 .RE .SS "gauge( )" .IX Subsection "gauge( )" .IP "\s-1EXAMPLE\s0" 4 .IX Item "EXAMPLE" .RS 4 .Vb 5 \& $xosd\->gauge( text => "", \& percent => $current_percentage, \& length => 40, \& bar => "\-", \& mark => "|" ); .Ve .RE .RS 4 .RE .IP "\s-1DESCRIPTION\s0" 4 .IX Item "DESCRIPTION" .RS 4 .RS 6 Display a gauge bar with a percentage mark on the screen with an optional message. .RE .RE .RS 4 .RE .IP "\s-1RETURNS\s0" 4 .IX Item "RETURNS" .RS 4 .RS 6 Nothing. .RE .RE .RS 4 .RE .SS "display_start( )" .IX Subsection "display_start( )" .IP "\s-1EXAMPLE\s0" 4 .IX Item "EXAMPLE" .RS 4 .Vb 1 \& $xosd\->display_start( ); .Ve .RE .RS 4 .RE .IP "\s-1DESCRIPTION\s0" 4 .IX Item "DESCRIPTION" .RS 4 .RS 6 Opens a pipe command to the \fIosd_cat\fR\|(1) program for prolonged interactivity. This accepts all of the standard options but has nothing else to offer. The other display_*() methods (detailed below) return zero unless this method has been used and has created the command pipe. .RE .RE .RS 4 .RE .IP "\s-1RETURNS\s0" 4 .IX Item "RETURNS" .RS 4 .RS 6 \&\s-1TRUE\s0 (1) for success and \s-1FALSE\s0 (0) otherwise. .RE .RE .RS 4 .RE .SS "display_text( )" .IX Subsection "display_text( )" .IP "\s-1EXAMPLE\s0" 4 .IX Item "EXAMPLE" .RS 4 .Vb 2 \& $xosd\->display_start(); \& $xosd\->display_text( "Some string to display." ); .Ve .RE .RS 4 .RE .IP "\s-1DESCRIPTION\s0" 4 .IX Item "DESCRIPTION" .RS 4 .RS 6 Uses the command pipe created by \fIdisplay_start()\fR and prints the first argument to the screen. This method does not have any options, save the one string scalar. .RE .RE .RS 4 .RE .IP "\s-1RETURNS\s0" 4 .IX Item "RETURNS" .RS 4 .RS 6 \&\s-1TRUE\s0 (1) for success and \s-1FALSE\s0 (0) otherwise. .RE .RE .RS 4 .RE .SS "display_gauge( )" .IX Subsection "display_gauge( )" .IP "\s-1EXAMPLE\s0" 4 .IX Item "EXAMPLE" .RS 4 .Vb 2 \& $xosd\->display_start(); \& $xosd\->display_gauge( 50, "display an optional text string." ); .Ve .RE .RS 4 .RE .IP "\s-1DESCRIPTION\s0" 4 .IX Item "DESCRIPTION" .RS 4 .RS 6 Uses the command pipe created by \fIdisplay_start()\fR and prints a gauge identical to the regular (stand-alone) \fIgauge()\fR method. There are only to accepted arguments; the desired percentage and an optional text string. .RE .RE .RS 4 .RE .IP "\s-1RETURNS\s0" 4 .IX Item "RETURNS" .RS 4 .RS 6 \&\s-1TRUE\s0 (1) for success and \s-1FALSE\s0 (0) otherwise. .RE .RE .RS 4 .RE .SS "display_stop( )" .IX Subsection "display_stop( )" .IP "\s-1EXAMPLE\s0" 4 .IX Item "EXAMPLE" .RS 4 .Vb 3 \& $xosd\->display_start(); \& $xosd\->display_text( "about to stop!" ); \& $xosd\->display_stop(); .Ve .RE .RS 4 .RE .IP "\s-1DESCRIPTION\s0" 4 .IX Item "DESCRIPTION" .RS 4 .RS 6 This closes the command pipe opened by the \fIdisplay_start()\fR method. This method takes no arguments and performs only the task for closing and existing command pipe. .RE .RE .RS 4 .RE .IP "\s-1RETURNS\s0" 4 .IX Item "RETURNS" .RS 4 .RS 6 \&\s-1TRUE\s0 (1) for success and \s-1FALSE\s0 (0) otherwise. .RE .RE .RS 4 .RE .SH "SEE ALSO" .IX Header "SEE ALSO" .IP "\s-1PERLDOC\s0" 2 .IX Item "PERLDOC" .Vb 2 \& UI::Dialog \& UI::Dialog::Backend .Ve .IP "\s-1MAN FILES\s0" 2 .IX Item "MAN FILES" \&\fIosd_cat\fR\|(1) .SH "BUGS" .IX Header "BUGS" Please email the author with any bug reports. Include the name of the module in the subject line. .SH "AUTHOR" .IX Header "AUTHOR" Kevin C. Krinke, .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" .Vb 1 \& Copyright (C) 2004\-2016 Kevin C. Krinke \& \& This library is free software; you can redistribute it and/or \& modify it under the terms of the GNU Lesser General Public \& License as published by the Free Software Foundation; either \& version 2.1 of the License, or (at your option) any later version. \& \& This library is distributed in the hope that it will be useful, \& but WITHOUT ANY WARRANTY; without even the implied warranty of \& MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU \& Lesser General Public License for more details. \& \& You should have received a copy of the GNU Lesser General Public \& License along with this library; if not, write to the Free Software \& Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111\-1307 USA .Ve