Gtk2::Ex::Dashes -- widget displaying row of dashes
use Gtk2::Ex::Dashes; my $dashes = Gtk2::Ex::Dashes->new;
Gtk2::Ex::Dashes is a subclass of
Gtk2::Widget Gtk2::Misc Gtk2::Ex::Dashes
Gtk2::Ex::Dashes widget displays a line of dashes, either horizontally or vertically.
+--------------------------------+ | | | ==== ==== ==== ==== ==== | | | +--------------------------------+
It's similar to
Gtk2::Separator, but a dashed line, and the
Gtk2::Ex::Dashes::MenuItem subclass is similar to
Gtk2::TearoffMenuItem, but a plain item not driving the menu.
Line segments are drawn per the widget style (see Gtk2::Style) and positioned in the widget area per the
Gtk2::Misc properties described below. There's nothing to control the length and spacing of the line segments, currently they just scale with the line thickness to keep the display sensible.
$dashes = Gtk2::Ex::Dashes->new (key=>value,...)
Create and return a new Dashes widget. Optional key/value pairs can be given to set initial properties, as per
my $dashes = Gtk2::Ex::Dashes->new (xalign => 0, direction => 'vertical');
Gtk2::Orientationenum, default "horizontal")
Whether to draw a horizontal line or a vertical line.
xalign(float, default 0.5)
yalign(float, default 0.5)
Gtk2::Misc properties control positioning of the line within its allocated area. The default 0.5 means centre it.
xalign for a horizontal line can be thought of as positioning one dash segment somewhere between the left and right ends, and then then further segments drawn each way from there to fill the window. Similarly
yalign when vertical.
If the widget text direction (see
set_direction in Gtk2::Widget) is
rtl then the sense of
xalign is reversed, so 0 means the right edge instead of the left.
Gtk2-Ex-Dashes is Copyright 2010 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/.