.\" 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 "Gtk2::Ex::VolumeButton 3pm" .TH Gtk2::Ex::VolumeButton 3pm "2018-06-30" "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" Gtk2::Ex::VolumeButton \- widget to control volume and similar values .SH "DESCRIPTION" .IX Header "DESCRIPTION" Gtk2::Ex::VolumeButton is a simple Gtk2 widget based on Gtk2::ToggleButton to control the volume and similar values. It consists of a Gtk2::ToggleButton widget displaying an image representing the current volume. When the button is clicked a popup window containing a Gtk2::VScale widget shows up and allows you to change the widgets volume value. It's also possible to change the volume using the scroll wheel over the toggle button even if the popup window isn't shown. .PP This widget is modeled after the widgets use in gnome-panel, muine and rhythmbox. Much code is stolen from the muine volume-button widget. .SH "OBJECT HIERARCHY" .IX Header "OBJECT HIERARCHY" .Vb 8 \& Glib::Object \& +\-\-\-\-Gtk2::Object \& +\-\-\-\-Gtk2::Widget \& +\-\-\-\-Gtk2::Container \& +\-\-\-\-\-Gtk2::Bin \& +\-\-\-\-Gtk2::Button \& +\-\-\-\-Gtk2::ToggleButton \& +\-\-\-\-Gtk2::Ex::VolumeButton .Ve .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Gtk2::Ex::VolumeButton; \& \& ... \& \& my $vb = Gtk2::Ex::VolumeButton\->new( \& volume => 20, \& mute_image => \*(Aqmute.png\*(Aq, \& zero_image => \*(Aqzero.png\*(Aq, \& min_image => \*(Aqmin.png\*(Aq, \& medium_image => \*(Aqmedium.png\*(Aq, \& max_image => \*(Aqmax.png\*(Aq, \& icon_size => 20, \& position => \*(Aqtop\*(Aq, \& muted => 1 \& ); \& $vb\->show(); \& \& $vb\->signal_connect( volume_changed => \& sub { print \*(Aqvolume changed: \*(Aq, $vb\->{volume}, "\en" } ); \& \& $vb\->signal_connect( mute_changed => \& sub { print $_[1] ? \*(Aqmuted : \*(Aqunmuted\*(Aq, "\en" } ); \& \& ... \& \& Gtk2\->main(); .Ve .SH "PROPERTIES" .IX Header "PROPERTIES" .IP "'volume' (int : readable / writable)" 4 .IX Item "'volume' (int : readable / writable)" Current volume .IP "'mute_image' (string : readable / writable)" 4 .IX Item "'mute_image' (string : readable / writable)" Image to lay over the current image when the volume is muted .IP "'zero_image' (string : readable / writable)" 4 .IX Item "'zero_image' (string : readable / writable)" Image to display when the volume is zero .IP "'min_image' (string : readable / writable)" 4 .IX Item "'min_image' (string : readable / writable)" Image to display when the volume is minimal .IP "'medium_image' (string : readable / writable)" 4 .IX Item "'medium_image' (string : readable / writable)" Image to display when the volume is medium .IP "'max_image' (string : readable / writable)" 4 .IX Item "'max_image' (string : readable / writable)" Image to display when the volume is maximal .IP "'position' (string : readable / writable)" 4 .IX Item "'position' (string : readable / writable)" Position of the popup window relativ to the button .Sp \&'top' and 'buttom' are supported .IP "'muted' (boolean : readable / writable)" 4 .IX Item "'muted' (boolean : readable / writable)" Is the volume muted? .SH "SIGNALS" .IX Header "SIGNALS" .IP "'volume_changed'" 4 .IX Item "'volume_changed'" Emitted when the volume property is changed .IP "'mute_changed'" 4 .IX Item "'mute_changed'" Emitted when the mute status is changed .SH "SEE ALSO" .IX Header "SEE ALSO" Gtk2, Glib::Object, Gtk2::Object, Gtk2::Widget, Gtk2::Container, Gtk2::Bin, Gtk2::Button, Gtk2::ToggleButton .SH "AUTHOR" .IX Header "AUTHOR" Florian Ragwitz .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright (C) 2004 by Florian Ragwitz .PP This program is free software; you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. .PP This program is distributed in the hope that it will be useful, but \s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of \&\s-1MERCHANTABILITY\s0 or \s-1FITNESS FOR A PARTICULAR PURPOSE.\s0 See the \&\s-1GNU\s0 Library General Public License for more details. .PP You should have received a copy of the \s-1GNU\s0 General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place \- Suite 330, Boston, \s-1MA 02111\-1307, USA.\s0