.\" 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::ActionGroup 3pm" .TH Gtk2::ActionGroup 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::ActionGroup \- wrapper for GtkActionGroup .SS "\s-1NOTE:\s0 Translation" .IX Subsection "NOTE: Translation" In C, gtk+'s action groups can use the translation domain to ensure that action labels and tooltips are translated along with the rest of the app. However, the translation function was not available for calling \fBby\fR the Perl bindings until gtk+ 2.6; that is, setting the translation domain had no effect. Translation of action groups is supported in Perl as of Gtk2 1.080 using gtk+ 2.6.0 or later. .SH "HIERARCHY" .IX Header "HIERARCHY" .Vb 2 \& Glib::Object \& +\-\-\-\-Gtk2::ActionGroup .Ve .SH "INTERFACES" .IX Header "INTERFACES" .Vb 1 \& Gtk2::Buildable .Ve .SH "METHODS" .IX Header "METHODS" .SS "actiongroup = Gtk2::ActionGroup\->\fBnew\fP ($name)" .IX Subsection "actiongroup = Gtk2::ActionGroup->new ($name)" .IP "\(bu" 4 \&\f(CW$name\fR (string) .ie n .SS "action = $action_group\->\fBget_action\fP ($action_name)" .el .SS "action = \f(CW$action_group\fP\->\fBget_action\fP ($action_name)" .IX Subsection "action = $action_group->get_action ($action_name)" .IP "\(bu" 4 \&\f(CW$action_name\fR (string) .ie n .SS "$action_group\->\fBadd_action\fP ($action)" .el .SS "\f(CW$action_group\fP\->\fBadd_action\fP ($action)" .IX Subsection "$action_group->add_action ($action)" .IP "\(bu" 4 \&\f(CW$action\fR (Gtk2::Action) .ie n .SS "$action_group\->\fBadd_action_with_accel\fP ($action, $accelerator)" .el .SS "\f(CW$action_group\fP\->\fBadd_action_with_accel\fP ($action, \f(CW$accelerator\fP)" .IX Subsection "$action_group->add_action_with_accel ($action, $accelerator)" .IP "\(bu" 4 \&\f(CW$action\fR (Gtk2::Action) .IP "\(bu" 4 \&\f(CW$accelerator\fR (string or undef) .ie n .SS "$action_group\->\fBadd_actions\fP ($action_entries, $user_data=undef)" .el .SS "\f(CW$action_group\fP\->\fBadd_actions\fP ($action_entries, \f(CW$user_data\fP=undef)" .IX Subsection "$action_group->add_actions ($action_entries, $user_data=undef)" .IP "\(bu" 4 \&\f(CW$action_entries\fR (scalar) .IP "\(bu" 4 \&\f(CW$user_data\fR (scalar) .ie n .SS "$action_group\->\fBadd_radio_actions\fP ($radio_action_entries, $value, $on_change, $user_data=undef)" .el .SS "\f(CW$action_group\fP\->\fBadd_radio_actions\fP ($radio_action_entries, \f(CW$value\fP, \f(CW$on_change\fP, \f(CW$user_data\fP=undef)" .IX Subsection "$action_group->add_radio_actions ($radio_action_entries, $value, $on_change, $user_data=undef)" .IP "\(bu" 4 \&\f(CW$radio_action_entries\fR (scalar) .IP "\(bu" 4 \&\f(CW$value\fR (integer) .IP "\(bu" 4 \&\f(CW$on_change\fR (scalar) .IP "\(bu" 4 \&\f(CW$user_data\fR (scalar) .PP Create and add a set of \f(CW\*(C`Gtk2::RadioAction\*(C'\fR actions to \&\f(CW$action_group\fR. For example .PP .Vb 11 \& $action_group\->add_radio_actions \& ([ [ "Red", undef, "_Red", "R", "Blood", 1 ], \& [ "Green", undef, "_Green", "G", "Grass", 2 ], \& [ "Blue", undef, "_Blue", "B", "Sky", 3 ], \& ], \& 2, # initial, or \-1 for no initial \& sub { \& my ($first_action, $selected_action, $userdata) = @_; \& print "now: ", $selected_action\->get_name, "\en"; \& }, \& $userdata); .Ve .PP \&\f(CW\*(C`radio_action_entries\*(C'\fR is an arrayref, each element of which is either a ref to a 6\-element array .PP .Vb 7 \& [ $name, # string \& $stock_id, # string, or undef \& $label, # string, or undef to use stock label \& $accelerator, # string key name, or undef for no accel \& $tooltip, # string, or undef for no tooltip \& $value # integer, for $action\->set_current_value etc \& ] .Ve .PP or a ref to a hash of named fields similarly. A \f(CW\*(C`name\*(C'\fR is mandatory, the rest are optional. \f(CW\*(C`value\*(C'\fR defaults to 0 if absent or \f(CW\*(C`undef\*(C'\fR. .PP .Vb 6 \& { name => $name, \& stock_id => $stock_id, \& label => $label, \& accelerator => $accelerator, \& tooltip => $tooltip, \& value => $value } .Ve .PP If \f(CW$on_change\fR is not \f(CW\*(C`undef\*(C'\fR then it's a signal handler function which is connected to the \f(CW\*(C`changed\*(C'\fR signal on the first action created. See Gtk2::RadioAction for that signal. .ie n .SS "$action_group\->\fBadd_toggle_actions\fP ($toggle_action_entries, $user_data=undef)" .el .SS "\f(CW$action_group\fP\->\fBadd_toggle_actions\fP ($toggle_action_entries, \f(CW$user_data\fP=undef)" .IX Subsection "$action_group->add_toggle_actions ($toggle_action_entries, $user_data=undef)" .IP "\(bu" 4 \&\f(CW$toggle_action_entries\fR (scalar) .IP "\(bu" 4 \&\f(CW$user_data\fR (scalar) .ie n .SS "list = $action_group\->\fBlist_actions\fP" .el .SS "list = \f(CW$action_group\fP\->\fBlist_actions\fP" .IX Subsection "list = $action_group->list_actions" .ie n .SS "string = $action_group\->\fBget_name\fP" .el .SS "string = \f(CW$action_group\fP\->\fBget_name\fP" .IX Subsection "string = $action_group->get_name" .ie n .SS "$action_group\->\fBremove_action\fP ($action)" .el .SS "\f(CW$action_group\fP\->\fBremove_action\fP ($action)" .IX Subsection "$action_group->remove_action ($action)" .IP "\(bu" 4 \&\f(CW$action\fR (Gtk2::Action) .ie n .SS "boolean = $action_group\->\fBget_sensitive\fP" .el .SS "boolean = \f(CW$action_group\fP\->\fBget_sensitive\fP" .IX Subsection "boolean = $action_group->get_sensitive" .ie n .SS "$action_group\->\fBset_sensitive\fP ($sensitive)" .el .SS "\f(CW$action_group\fP\->\fBset_sensitive\fP ($sensitive)" .IX Subsection "$action_group->set_sensitive ($sensitive)" .IP "\(bu" 4 \&\f(CW$sensitive\fR (boolean) .ie n .SS "$action_group\->\fBset_translate_func\fP ($func, $data=undef)" .el .SS "\f(CW$action_group\fP\->\fBset_translate_func\fP ($func, \f(CW$data\fP=undef)" .IX Subsection "$action_group->set_translate_func ($func, $data=undef)" .IP "\(bu" 4 \&\f(CW$func\fR (scalar) .IP "\(bu" 4 \&\f(CW$data\fR (scalar) .PP Since: gtk+ 2.6 .ie n .SS "string = $action_group\->\fBtranslate_string\fP ($string)" .el .SS "string = \f(CW$action_group\fP\->\fBtranslate_string\fP ($string)" .IX Subsection "string = $action_group->translate_string ($string)" .IP "\(bu" 4 \&\f(CW$string\fR (string) .PP Since: gtk+ 2.6 .ie n .SS "$action_group\->\fBset_translation_domain\fP ($domain)" .el .SS "\f(CW$action_group\fP\->\fBset_translation_domain\fP ($domain)" .IX Subsection "$action_group->set_translation_domain ($domain)" .IP "\(bu" 4 \&\f(CW$domain\fR (string) .ie n .SS "boolean = $action_group\->\fBget_visible\fP" .el .SS "boolean = \f(CW$action_group\fP\->\fBget_visible\fP" .IX Subsection "boolean = $action_group->get_visible" .ie n .SS "$action_group\->\fBset_visible\fP ($sensitive)" .el .SS "\f(CW$action_group\fP\->\fBset_visible\fP ($sensitive)" .IX Subsection "$action_group->set_visible ($sensitive)" .IP "\(bu" 4 \&\f(CW$sensitive\fR (boolean) .SH "PROPERTIES" .IX Header "PROPERTIES" .IP "'name' (string : default undef : readable / writable / construct-only / private)" 4 .IX Item "'name' (string : default undef : readable / writable / construct-only / private)" A name for the action group. .IP "'sensitive' (boolean : default true : readable / writable / private)" 4 .IX Item "'sensitive' (boolean : default true : readable / writable / private)" Whether the action group is enabled. .IP "'visible' (boolean : default true : readable / writable / private)" 4 .IX Item "'visible' (boolean : default true : readable / writable / private)" Whether the action group is visible. .SH "SIGNALS" .IX Header "SIGNALS" .IP "\fBconnect-proxy\fR (Gtk2::ActionGroup, Gtk2::Action, Gtk2::Widget)" 4 .IX Item "connect-proxy (Gtk2::ActionGroup, Gtk2::Action, Gtk2::Widget)" .PD 0 .IP "\fBdisconnect-proxy\fR (Gtk2::ActionGroup, Gtk2::Action, Gtk2::Widget)" 4 .IX Item "disconnect-proxy (Gtk2::ActionGroup, Gtk2::Action, Gtk2::Widget)" .IP "\fBpost-activate\fR (Gtk2::ActionGroup, Gtk2::Action)" 4 .IX Item "post-activate (Gtk2::ActionGroup, Gtk2::Action)" .IP "\fBpre-activate\fR (Gtk2::ActionGroup, Gtk2::Action)" 4 .IX Item "pre-activate (Gtk2::ActionGroup, Gtk2::Action)" .PD .SH "SEE ALSO" .IX Header "SEE ALSO" Gtk2, Glib::Object .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.