NAME

App::MathImage::Gtk2::Ex::ArrowButton -- button with a direction arrow

SYNOPSIS

use App::MathImage::Gtk2::Ex::ArrowButton;
my $ab = App::MathImage::Gtk2::Ex::ArrowButton->new;

WIDGET HIERARCHY

App::MathImage::Gtk2::Ex::ArrowButton is a subclass of Gtk2::Button,

Gtk2::Widget
  Gtk2::Container
    Gtk2::Bin
      Gtk2::Button
        App::MathImage::Gtk2::Ex::ArrowButton

DESCRIPTION

An ArrowButton widget is a Gtk2::Button with a directional arrow drawn in it.

+-----------+
|    +      |
|    |\     |
|    | \    |
|    |  +   |
|    | /    |
|    |/     |
|    +      |
+-----------+

In the current code it's done simply with a Gtk2::Arrow widget child, but with various properties and style settings arranged to make it fill the button, and to avoid the arrow's otherwise hard-coded 15 pixel minimum size.

FUNCTIONS

$ab = App::MathImage::Gtk2::Ex::ArrowButton->new (key=>value,...)

Create and return a new ArrowButton object. Optional key/value pairs set initial properties per Glib::Object->new.

my $ab = App::MathImage::Gtk2::Ex::ArrowButton->new (arrow_type => 'left');

PROPERTIES

arrow-type (Gtk2::ArrowType enum, default right)

The arrow type to show, one of up, down, left, right or none. none means nothing is shown. The default is the same as Gtk2::Arrow.

IMPLEMENTATION NOTES

Gtk2::Arrow always responds to its $arrow->size_request asking for 15x15 pixels. Most container widgets (including Gtk2::Button) respect that and the effect is that it can be made bigger if desired, but no smaller than 15 pixels. A $arrow->set_size_request(1,1) or similar can be used to reduce it if the container's size is going to be determined elsewhere and the arrows shouldn't have a minimum.

SEE ALSO

Gtk2::Button, Gtk2::Arrow

HOME PAGE

http://user42.tuxfamily.org/math-image/index.html

LICENSE

Copyright 2010, 2011, 2012, 2013, 2014, 2019 Kevin Ryde

Math-Image 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.

Math-Image 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 Math-Image. If not, see http://www.gnu.org/licenses/.