GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Gtk2::ActionGroup(3) User Contributed Perl Documentation Gtk2::ActionGroup(3)

Gtk2::ActionGroup - wrapper for GtkActionGroup

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 by 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.

  Glib::Object
  +----Gtk2::ActionGroup

  Gtk2::Buildable

$name (string)

$action_name (string)

$action (Gtk2::Action)

  • $action (Gtk2::Action)
  • $accelerator (string or undef)

  • $action_entries (scalar)
  • $user_data (scalar)

  • $radio_action_entries (scalar)
  • $value (integer)
  • $on_change (scalar)
  • $user_data (scalar)

Create and add a set of "Gtk2::RadioAction" actions to $action_group. For example

    $action_group->add_radio_actions
      ([ [ "Red",   undef, "_Red",   "<Control>R", "Blood", 1 ],
         [ "Green", undef, "_Green", "<Control>G", "Grass", 2 ],
         [ "Blue",  undef, "_Blue",  "<Control>B", "Sky",   3 ],
       ],
       2,    # initial, or -1 for no initial
       sub {
         my ($first_action, $selected_action, $userdata) = @_;
         print "now: ", $selected_action->get_name, "\n";
       },
       $userdata);

"radio_action_entries" is an arrayref, each element of which is either a ref to a 6-element array

    [ $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
    ]

or a ref to a hash of named fields similarly. A "name" is mandatory, the rest are optional. "value" defaults to 0 if absent or "undef".

    { name        => $name,
      stock_id    => $stock_id,
      label       => $label,
      accelerator => $accelerator,
      tooltip     => $tooltip,
      value       => $value }

If $on_change is not "undef" then it's a signal handler function which is connected to the "changed" signal on the first action created. See Gtk2::RadioAction for that signal.

  • $toggle_action_entries (scalar)
  • $user_data (scalar)

$action (Gtk2::Action)

$sensitive (boolean)

  • $func (scalar)
  • $data (scalar)

Since: gtk+ 2.6

$string (string)

Since: gtk+ 2.6

$domain (string)

$sensitive (boolean)

'name' (string : default undef : readable / writable / construct-only / private / static-nick / static-blurb)
A name for the action group.
'sensitive' (boolean : default true : readable / writable / private / static-nick / static-blurb)
Whether the action group is enabled.
'visible' (boolean : default true : readable / writable / private / static-nick / static-blurb)
Whether the action group is visible.

connect-proxy (Gtk2::ActionGroup, Gtk2::Action, Gtk2::Widget)
disconnect-proxy (Gtk2::ActionGroup, Gtk2::Action, Gtk2::Widget)
post-activate (Gtk2::ActionGroup, Gtk2::Action)
pre-activate (Gtk2::ActionGroup, Gtk2::Action)

Gtk2, Glib::Object

Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL. See Gtk2 for a full notice.

2022-06-07 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.