---
name: "Gtk2::ToolItem"
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::ToolItem"
---

# Gtk2::ToolItem(3pm)

wrapper for GtkToolItem

## NAME

Gtk2::ToolItem - wrapper for GtkToolItem

## HIERARCHY

```
  Glib::Object
  +----Glib::InitiallyUnowned
       +----Gtk2::Object
            +----Gtk2::Widget
                 +----Gtk2::Container
                      +----Gtk2::Bin
                           +----Gtk2::ToolItem
```

## INTERFACES

```
  Glib::Object::_Unregistered::AtkImplementorIface
  Gtk2::Buildable
  Gtk2::Activatable
```

## METHODS

### toolitem = Gtk2::ToolItem-\>new

### ellipsizemode = $tool\_item-\>get\_ellipsize\_mode

Since: gtk+ 2.20

### boolean = $tool\_item-\>get\_expand

### $tool\_item-\>set\_expand ($expand)

- •

  `$expand` (boolean)

### boolean = $tool\_item-\>get\_homogeneous

### $tool\_item-\>set\_homogeneous ($homogeneous)

- •

  `$homogeneous` (boolean)

### iconsize = $tool\_item-\>get\_icon\_size

### boolean = $tool\_item-\>get\_is\_important

### $tool\_item-\>set\_is\_important ($is\_important)

- •

  `$is_important` (boolean)

### orientation = $tool\_item-\>get\_orientation

### widget = $tool\_item-\>get\_proxy\_menu\_item ($menu\_item\_id)

- •

  `$menu_item_id` (string)

### $tool\_item-\>set\_proxy\_menu\_item ($menu\_item\_id, $menu\_item)

- •

  `$menu_item_id` (string)

- •

  `$menu_item` (Gtk2::Widget or undef)

### $tool\_item-\>rebuild\_menu

Since: gtk+ 2.6

### reliefstyle = $tool\_item-\>get\_relief\_style

### widget = $tool\_item-\>retrieve\_proxy\_menu\_item

### double = $tool\_item-\>get\_text\_alignment

Since: gtk+ 2.20

### orientation = $tool\_item-\>get\_text\_orientation

Since: gtk+ 2.20

### sizegroup = $tool\_item-\>get\_text\_size\_group

Since: gtk+ 2.20

### $tool\_item-\>toolbar\_reconfigured

Since: gtk+ 2.14

### toolbarstyle = $tool\_item-\>get\_toolbar\_style

### $tool\_item-\>set\_tooltip\_markup ($markup)

- •

  `$markup` (string or undef)

Since: gtk+ 2.12

### $tool\_item-\>set\_tooltip ($tooltips, $tip\_text, $tip\_private)

- •

  `$tooltips` (Gtk2::Tooltips)

- •

  `$tip_text` (string)

- •

  `$tip_private` (string)

### $tool\_item-\>set\_tooltip\_text ($text)

- •

  `$text` (string or undef)

Since: gtk+ 2.12

### boolean = $toolitem-\>get\_use\_drag\_window

### $toolitem-\>set\_use\_drag\_window ($use\_drag\_window)

- •

  `$use_drag_window` (boolean)

### boolean = $toolitem-\>get\_visible\_horizontal

### $toolitem-\>set\_visible\_horizontal ($visible\_horizontal)

- •

  `$visible_horizontal` (boolean)

### boolean = $toolitem-\>get\_visible\_vertical

### $toolitem-\>set\_visible\_vertical ($visible\_vertical)

- •

  `$visible_vertical` (boolean)

## PROPERTIES

- 'is-important' (boolean : default false : readable / writable / private)

  Whether the toolbar item is considered important. When TRUE, toolbar buttons show text in GTK\_TOOLBAR\_BOTH\_HORIZ mode

- 'visible-horizontal' (boolean : default true : readable / writable / private)

  Whether the toolbar item is visible when the toolbar is in a horizontal orientation.

- 'visible-vertical' (boolean : default true : readable / writable / private)

  Whether the toolbar item is visible when the toolbar is in a vertical orientation.

## SIGNALS

- boolean = **create-menu-proxy** (Gtk2::ToolItem)

  - boolean = **set-tooltip** (Gtk2::ToolItem, Gtk2::Tooltips, string, string)

  - **toolbar-reconfigured** (Gtk2::ToolItem)

  ## ENUMS AND FLAGS

### enum Gtk2::IconSize

- •

  'invalid' / 'GTK\_ICON\_SIZE\_INVALID'

- •

  'menu' / 'GTK\_ICON\_SIZE\_MENU'

- •

  'small-toolbar' / 'GTK\_ICON\_SIZE\_SMALL\_TOOLBAR'

- •

  'large-toolbar' / 'GTK\_ICON\_SIZE\_LARGE\_TOOLBAR'

- •

  'button' / 'GTK\_ICON\_SIZE\_BUTTON'

- •

  'dnd' / 'GTK\_ICON\_SIZE\_DND'

- •

  'dialog' / 'GTK\_ICON\_SIZE\_DIALOG'

### enum Gtk2::Orientation

- •

  'horizontal' / 'GTK\_ORIENTATION\_HORIZONTAL'

- •

  'vertical' / 'GTK\_ORIENTATION\_VERTICAL'

### enum Gtk2::ReliefStyle

- •

  'normal' / 'GTK\_RELIEF\_NORMAL'

- •

  'half' / 'GTK\_RELIEF\_HALF'

- •

  'none' / 'GTK\_RELIEF\_NONE'

### enum Gtk2::ToolbarStyle

- •

  'icons' / 'GTK\_TOOLBAR\_ICONS'

- •

  'text' / 'GTK\_TOOLBAR\_TEXT'

- •

  'both' / 'GTK\_TOOLBAR\_BOTH'

- •

  'both-horiz' / 'GTK\_TOOLBAR\_BOTH\_HORIZ'

### enum Pango::EllipsizeMode

- •

  'none' / 'PANGO\_ELLIPSIZE\_NONE'

- •

  'start' / 'PANGO\_ELLIPSIZE\_START'

- •

  'middle' / 'PANGO\_ELLIPSIZE\_MIDDLE'

- •

  'end' / 'PANGO\_ELLIPSIZE\_END'

## SEE ALSO

Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container, Gtk2::Bin

## COPYRIGHT

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

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