.\" Automatically generated by Pod::Man 4.10 (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 .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Gtk2::Button 3pm" .TH Gtk2::Button 3pm "2019-09-16" "perl v5.28.1" "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::Button \- wrapper for GtkButton .SH "HIERARCHY" .IX Header "HIERARCHY" .Vb 7 \& Glib::Object \& +\-\-\-\-Glib::InitiallyUnowned \& +\-\-\-\-Gtk2::Object \& +\-\-\-\-Gtk2::Widget \& +\-\-\-\-Gtk2::Container \& +\-\-\-\-Gtk2::Bin \& +\-\-\-\-Gtk2::Button .Ve .SH "INTERFACES" .IX Header "INTERFACES" .Vb 3 \& Glib::Object::_Unregistered::AtkImplementorIface \& Gtk2::Buildable \& Gtk2::Activatable .Ve .SH "MNEMONICS" .IX Header "MNEMONICS" Mnemonics are \*(L"memory aids\*(R"; in \s-1GTK+,\s0 a mnemonic is an underlined character which corresponds to a keyboard accelerator. For a button, that means pressing Alt and that key activates the button. .PP For convenience, Gtk2\-Perl uses mnemonics by default on widgets that support them. If characters in label string are preceded by an underscore, they are underlined. If you need a literal underscore character in a label, use '_\|_' (two underscores). If you don't want to use mnemonics at all, use the non-mnemonic version explicitly (e.g. \f(CW\*(C`Gtk2::Button::new_with_label\*(C'\fR). .SH "METHODS" .IX Header "METHODS" .SS "widget = Gtk2::Button\->\fBnew\fP" .IX Subsection "widget = Gtk2::Button->new" .SS "widget = Gtk2::Button\->\fBnew\fP ($mnemonic)" .IX Subsection "widget = Gtk2::Button->new ($mnemonic)" .IP "\(bu" 4 \&\f(CW$mnemonic\fR (string) used to label the widget, see \*(L"\s-1MNEMONICS\*(R"\s0 .SS "widget = Gtk2::Button\->\fBnew_from_stock\fP ($stock_id)" .IX Subsection "widget = Gtk2::Button->new_from_stock ($stock_id)" .IP "\(bu" 4 \&\f(CW$stock_id\fR (string) creates a new button using the icon and text from the .PP specified stock item, see Gtk2::Stock .SS "widget = Gtk2::Button\->\fBnew_with_label\fP ($label)" .IX Subsection "widget = Gtk2::Button->new_with_label ($label)" .IP "\(bu" 4 \&\f(CW$label\fR (string) used to label the widget .SS "widget = Gtk2::Button\->\fBnew_with_mnemonic\fP ($mnemonic)" .IX Subsection "widget = Gtk2::Button->new_with_mnemonic ($mnemonic)" .IP "\(bu" 4 \&\f(CW$mnemonic\fR (string) used to label the widget, see \*(L"\s-1MNEMONICS\*(R"\s0 .ie n .SS "(xalign, yalign) = $button\->\fBget_alignment\fP" .el .SS "(xalign, yalign) = \f(CW$button\fP\->\fBget_alignment\fP" .IX Subsection "(xalign, yalign) = $button->get_alignment" Since: gtk+ 2.4 .ie n .SS "$button\->\fBset_alignment\fP ($xalign, $yalign)" .el .SS "\f(CW$button\fP\->\fBset_alignment\fP ($xalign, \f(CW$yalign\fP)" .IX Subsection "$button->set_alignment ($xalign, $yalign)" .IP "\(bu" 4 \&\f(CW$xalign\fR (double) .IP "\(bu" 4 \&\f(CW$yalign\fR (double) .PP Since: gtk+ 2.4 .ie n .SS "$button\->\fBclicked\fP" .el .SS "\f(CW$button\fP\->\fBclicked\fP" .IX Subsection "$button->clicked" .ie n .SS "$button\->\fBenter\fP" .el .SS "\f(CW$button\fP\->\fBenter\fP" .IX Subsection "$button->enter" .ie n .SS "window or undef = $button\->\fBget_event_window\fP" .el .SS "window or undef = \f(CW$button\fP\->\fBget_event_window\fP" .IX Subsection "window or undef = $button->get_event_window" Since: gtk+ 2.22 .ie n .SS "boolean = $button\->\fBget_focus_on_click\fP" .el .SS "boolean = \f(CW$button\fP\->\fBget_focus_on_click\fP" .IX Subsection "boolean = $button->get_focus_on_click" Since: gtk+ 2.4 .ie n .SS "$button\->\fBset_focus_on_click\fP ($focus_on_click)" .el .SS "\f(CW$button\fP\->\fBset_focus_on_click\fP ($focus_on_click)" .IX Subsection "$button->set_focus_on_click ($focus_on_click)" .IP "\(bu" 4 \&\f(CW$focus_on_click\fR (boolean) .PP Since: gtk+ 2.4 .ie n .SS "widget or undef = $button\->\fBget_image\fP" .el .SS "widget or undef = \f(CW$button\fP\->\fBget_image\fP" .IX Subsection "widget or undef = $button->get_image" Since: gtk+ 2.6 .ie n .SS "positiontype = $button\->\fBget_image_position\fP" .el .SS "positiontype = \f(CW$button\fP\->\fBget_image_position\fP" .IX Subsection "positiontype = $button->get_image_position" Since: gtk+ 2.10 .ie n .SS "$button\->\fBset_image_position\fP ($position)" .el .SS "\f(CW$button\fP\->\fBset_image_position\fP ($position)" .IX Subsection "$button->set_image_position ($position)" .IP "\(bu" 4 \&\f(CW$position\fR (Gtk2::PositionType) .PP Since: gtk+ 2.10 .ie n .SS "$button\->\fBset_image\fP ($image)" .el .SS "\f(CW$button\fP\->\fBset_image\fP ($image)" .IX Subsection "$button->set_image ($image)" .IP "\(bu" 4 \&\f(CW$image\fR (Gtk2::Widget or undef) .PP Since: gtk+ 2.6 .ie n .SS "string = $button\->\fBget_label\fP" .el .SS "string = \f(CW$button\fP\->\fBget_label\fP" .IX Subsection "string = $button->get_label" .ie n .SS "$button\->\fBset_label\fP ($label)" .el .SS "\f(CW$button\fP\->\fBset_label\fP ($label)" .IX Subsection "$button->set_label ($label)" .IP "\(bu" 4 \&\f(CW$label\fR (string) .ie n .SS "$button\->\fBleave\fP" .el .SS "\f(CW$button\fP\->\fBleave\fP" .IX Subsection "$button->leave" .ie n .SS "$button\->\fBpressed\fP" .el .SS "\f(CW$button\fP\->\fBpressed\fP" .IX Subsection "$button->pressed" .ie n .SS "$button\->\fBreleased\fP" .el .SS "\f(CW$button\fP\->\fBreleased\fP" .IX Subsection "$button->released" .ie n .SS "reliefstyle = $button\->\fBget_relief\fP" .el .SS "reliefstyle = \f(CW$button\fP\->\fBget_relief\fP" .IX Subsection "reliefstyle = $button->get_relief" .ie n .SS "$button\->\fBset_relief\fP ($newstyle)" .el .SS "\f(CW$button\fP\->\fBset_relief\fP ($newstyle)" .IX Subsection "$button->set_relief ($newstyle)" .IP "\(bu" 4 \&\f(CW$newstyle\fR (Gtk2::ReliefStyle) .ie n .SS "boolean = $button\->\fBget_use_stock\fP" .el .SS "boolean = \f(CW$button\fP\->\fBget_use_stock\fP" .IX Subsection "boolean = $button->get_use_stock" .ie n .SS "$button\->\fBset_use_stock\fP ($use_stock)" .el .SS "\f(CW$button\fP\->\fBset_use_stock\fP ($use_stock)" .IX Subsection "$button->set_use_stock ($use_stock)" .IP "\(bu" 4 \&\f(CW$use_stock\fR (boolean) .ie n .SS "boolean = $button\->\fBget_use_underline\fP" .el .SS "boolean = \f(CW$button\fP\->\fBget_use_underline\fP" .IX Subsection "boolean = $button->get_use_underline" .ie n .SS "$button\->\fBset_use_underline\fP ($use_underline)" .el .SS "\f(CW$button\fP\->\fBset_use_underline\fP ($use_underline)" .IX Subsection "$button->set_use_underline ($use_underline)" .IP "\(bu" 4 \&\f(CW$use_underline\fR (boolean) .SH "PROPERTIES" .IX Header "PROPERTIES" .IP "'focus\-on\-click' (boolean : default true : readable / writable / private)" 4 .IX Item "'focus-on-click' (boolean : default true : readable / writable / private)" Whether the button grabs focus when it is clicked with the mouse .IP "'image' (Gtk2::Widget : default undef : readable / writable / private)" 4 .IX Item "'image' (Gtk2::Widget : default undef : readable / writable / private)" Child widget to appear next to the button text .ie n .IP "'image\-position' (Gtk2::PositionType : default ""left"" : readable / writable / private)" 4 .el .IP "'image\-position' (Gtk2::PositionType : default ``left'' : readable / writable / private)" 4 .IX Item "'image-position' (Gtk2::PositionType : default left : readable / writable / private)" The position of the image relative to the text .IP "'label' (string : default undef : readable / writable / construct / private)" 4 .IX Item "'label' (string : default undef : readable / writable / construct / private)" Text of the label widget inside the button, if the button contains a label widget .ie n .IP "'relief' (Gtk2::ReliefStyle : default ""normal"" : readable / writable / private)" 4 .el .IP "'relief' (Gtk2::ReliefStyle : default ``normal'' : readable / writable / private)" 4 .IX Item "'relief' (Gtk2::ReliefStyle : default normal : readable / writable / private)" The border relief style .IP "'use\-stock' (boolean : default false : readable / writable / construct / private)" 4 .IX Item "'use-stock' (boolean : default false : readable / writable / construct / private)" If set, the label is used to pick a stock item instead of being displayed .IP "'use\-underline' (boolean : default false : readable / writable / construct / private)" 4 .IX Item "'use-underline' (boolean : default false : readable / writable / construct / private)" If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key .IP "'xalign' (float : default 0.5 : readable / writable / private)" 4 .IX Item "'xalign' (float : default 0.5 : readable / writable / private)" Horizontal position of child in available space. 0.0 is left aligned, 1.0 is right aligned .IP "'yalign' (float : default 0.5 : readable / writable / private)" 4 .IX Item "'yalign' (float : default 0.5 : readable / writable / private)" Vertical position of child in available space. 0.0 is top aligned, 1.0 is bottom aligned .SH "STYLE PROPERTIES" .IX Header "STYLE PROPERTIES" .IP "'child\-displacement\-x' (integer : default 0 : readable / private)" 4 .IX Item "'child-displacement-x' (integer : default 0 : readable / private)" How far in the x direction to move the child when the button is depressed .IP "'child\-displacement\-y' (integer : default 0 : readable / private)" 4 .IX Item "'child-displacement-y' (integer : default 0 : readable / private)" How far in the y direction to move the child when the button is depressed .IP "'default\-border' (Gtk2::Border : default undef : readable / private)" 4 .IX Item "'default-border' (Gtk2::Border : default undef : readable / private)" Extra space to add for \s-1GTK_CAN_DEFAULT\s0 buttons .IP "'default\-outside\-border' (Gtk2::Border : default undef : readable / private)" 4 .IX Item "'default-outside-border' (Gtk2::Border : default undef : readable / private)" Extra space to add for \s-1GTK_CAN_DEFAULT\s0 buttons that is always drawn outside the border .IP "'displace\-focus' (boolean : default false : readable / private)" 4 .IX Item "'displace-focus' (boolean : default false : readable / private)" Whether the child_displacement_x/_y properties should also affect the focus rectangle .IP "'image\-spacing' (integer : default 2 : readable / private)" 4 .IX Item "'image-spacing' (integer : default 2 : readable / private)" Spacing in pixels between the image and label .IP "'inner\-border' (Gtk2::Border : default undef : readable / private)" 4 .IX Item "'inner-border' (Gtk2::Border : default undef : readable / private)" Border between button edges and child. .SH "SIGNALS" .IX Header "SIGNALS" .IP "\fBactivate\fR (Gtk2::Button)" 4 .IX Item "activate (Gtk2::Button)" .PD 0 .IP "\fBclicked\fR (Gtk2::Button)" 4 .IX Item "clicked (Gtk2::Button)" .IP "\fBenter\fR (Gtk2::Button)" 4 .IX Item "enter (Gtk2::Button)" .IP "\fBleave\fR (Gtk2::Button)" 4 .IX Item "leave (Gtk2::Button)" .IP "\fBpressed\fR (Gtk2::Button)" 4 .IX Item "pressed (Gtk2::Button)" .IP "\fBreleased\fR (Gtk2::Button)" 4 .IX Item "released (Gtk2::Button)" .PD .SH "ENUMS AND FLAGS" .IX Header "ENUMS AND FLAGS" .SS "enum Gtk2::PositionType" .IX Subsection "enum Gtk2::PositionType" .IP "\(bu" 4 \&'left' / '\s-1GTK_POS_LEFT\s0' .IP "\(bu" 4 \&'right' / '\s-1GTK_POS_RIGHT\s0' .IP "\(bu" 4 \&'top' / '\s-1GTK_POS_TOP\s0' .IP "\(bu" 4 \&'bottom' / '\s-1GTK_POS_BOTTOM\s0' .SS "enum Gtk2::ReliefStyle" .IX Subsection "enum Gtk2::ReliefStyle" .IP "\(bu" 4 \&'normal' / '\s-1GTK_RELIEF_NORMAL\s0' .IP "\(bu" 4 \&'half' / '\s-1GTK_RELIEF_HALF\s0' .IP "\(bu" 4 \&'none' / '\s-1GTK_RELIEF_NONE\s0' .SH "SEE ALSO" .IX Header "SEE ALSO" Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container, Gtk2::Bin .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (C) 2003\-2011 by the gtk2\-perl team. .PP This software is licensed under the \s-1LGPL.\s0 See Gtk2 for a full notice.