NAME

Gtk2::Ex::Dashes::MenuItem -- menu item showing a row of dashes

SYNOPSIS

use Gtk2::Ex::Dashes::MenuItem;
my $item = Gtk2::Ex::Dashes::MenuItem->new;
$menu->append ($item);

WIDGET HIERARCHY

Gtk2::Ex::Dashes::MenuItem is a subclass of Gtk2::MenuItem.

Gtk2::Widget
  Gtk2::Container
    Gtk2::Bin
      Gtk2::Item
        Gtk2::MenuItem
          Gtk2::Ex::Dashes::MenuItem

DESCRIPTION

A Gtk2::Ex::Dashes::MenuItem displays a line of dashes similar in appearance to a Gtk2::TearoffMenuItem, but as a plain menu item, not driving the tearoff state.

+--------------------------------+
|                                |
|  ====  ====  ====  ====  ====  |
|                                |
+--------------------------------+

Clicking on the item runs the MenuItem activate handler etc in the usual way. Connect to that signal to run an action for the item. The idea is you can open a dialog box or toplevel toolbox representing the menu contents, with more things or more features than just a torn-off menu would provide.

FUNCTIONS

$item = Gtk2::Ex::Dashes::MenuItem->new (key=>value,...)

Create and return a new Dashes::MenuItem widget. Optional key/value pairs can be given to set initial properties, as per Glib::Object->new.

For example setting the visible property saves the usual $item->show needed before adding to a menu.

my $item = Gtk2::Ex::Dashes::MenuItem->new (visible => 1);

PROPERTIES

There are properties beyond what Gtk2::MenuItem offers.

The widget text direction (ie. set_direction) on the Dashes::MenuItem controls which end the dashes start from. The effect of this is that a whole dash begins from the same end as the text (left to right or right to left).

SEE ALSO

Gtk2::Ex::Dashes, Gtk2::MenuItem, Gtk2::TearoffMenuItem

HOME PAGE

http://user42.tuxfamily.org/gtk2-ex-dashes/index.html

LICENSE

Gtk2-Ex-Dashes is Copyright 2010, 2019 Kevin Ryde

Gtk2-Ex-Dashes is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

Gtk2-Ex-Dashes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Gtk2-Ex-Dashes. If not, see http://www.gnu.org/licenses/.