Gtk2::Ex::Dashes::MenuItem -- menu item showing a row of dashes
my $item = Gtk2::Ex::Dashes::MenuItem->new;
Gtk2::Ex::Dashes::MenuItem is a subclass of Gtk2::MenuItem.
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.
$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);
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).
Gtk2::Ex::Dashes, Gtk2::MenuItem, Gtk2::TearoffMenuItem
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/.
To install Gtk2::Ex::Dashes, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.