---
name: "Gtk2::ItemFactory"
section: "3pm"
platform: "linux"
package: "libgtk2-perl-doc"
version: "2:1.24992-1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/Gtk2::ItemFactory"
---

# Gtk2::ItemFactory(3pm)

wrapper for GtkItemFactory

## NAME

Gtk2::ItemFactory - wrapper for GtkItemFactory

## HIERARCHY

```
  Glib::Object
  +----Glib::InitiallyUnowned
       +----Gtk2::Object
            +----Gtk2::ItemFactory
```

## DEPRECATION WARNING

Gtk2::ItemFactory has been marked as deprecated, and should not be used in newly written code.

You should use Gtk2::UIManager instead of Gtk2::ItemFactory.

## METHODS

### itemfactory = Gtk2::ItemFactory-\>new ($container\_type\_package, $path, $accel\_group=undef)

- •

  `$container_type_package` (string)

- •

  `$path` (string)

- •

  `$accel_group` (Gtk2::AccelGroup or undef)

### $ifactory-\>create\_item ($entry\_ref, $callback\_data=undef)

- •

  `$entry_ref` (scalar) GtkItemFactoryEntry

- •

  `$callback_data` (scalar)

### $ifactory-\>create\_items ($callback\_data, ...)

- •

  `$callback_data` (scalar)

- •

  ... (list) GtkItemFactoryEntry's

### $ifactory-\>delete\_entries (...)

- •

  ... (list) GtkItemFactoryEntry's

### $ifactory-\>delete\_entry ($entry\_ref)

- •

  `$entry_ref` (scalar) GtkItemFactoryEntry

### $ifactory-\>delete\_item ($path)

- •

  `$path` (string)

### itemfactory or undef = Gtk2::ItemFactory-\>from\_widget ($widget)

- •

  `$widget` (Gtk2::Widget)

### widget or undef = $ifactory-\>get\_item\_by\_action ($action)

- •

  `$action` (integer)

### widget or undef = $ifactory-\>get\_item ($path)

- •

  `$path` (string)

### string = Gtk2::ItemFactory-\>path\_from\_widget ($widget)

- •

  `$widget` (Gtk2::Widget)

### $ifactory-\>popup ($x, $y, $mouse\_button, $time\_, $popup\_data=undef)

- •

  `$x` (integer)

- •

  `$y` (integer)

- •

  `$mouse_button` (integer)

- •

  `$time_` (unsigned)

- •

  `$popup_data` (scalar)

### scalar = $ifactory-\>popup\_data

### scalar = Gtk2::ItemFactory-\>popup\_data\_from\_widget ($widget)

- •

  `$widget` (Gtk2::Widget)

### $ifactory-\>set\_translate\_func ($func, $data=undef)

- •

  `$func` (scalar)

- •

  `$data` (scalar)

### widget or undef = $ifactory-\>get\_widget\_by\_action ($action)

- •

  `$action` (integer)

### widget or undef = $ifactory-\>get\_widget ($path)

- •

  `$path` (string)

## SEE ALSO

Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object

## COPYRIGHT

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

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