NAME
Gtk2::Ex::AdjustmentBits -- helpers for Gtk2::Adjustment objects
SYNOPSIS
use Gtk2::Ex::AdjustmentBits;
FUNCTIONS
Gtk2::Ex::AdjustmentBits::scroll_value ($adj, $amount)
-
Add
$amount
to the value in$adj
, restricting the result to betweenlower
andupper - page
, as suitable for a scrollbar range etc. Gtk2::Ex::AdjustmentBits::set_maybe ($adjustment, field => $value, ...)
-
Set fields in
$adjustment
, with changed and notify signals emitted if the values are different from what's already there. The fields arevalue upper lower page_size page_increment step_increment
For example
Gtk2::Ex::AdjustmentBits::set_maybe ($adjustment, upper => 100.0, lower => 0.0, value => 50.0);
The plain field getter/setters like
$adjustment->upper()
don't emit any signals, and the object$adjustment->set
only emitsnotify
(orchanged
too in Gtk 2.18 or thereabouts).set_maybe
takes care of all necessary signals and does them only after storing all the values and only if actually changed.Not emitting signals when values are unchanged may save some work in widgets controlled by
$adjustment
, though a good widget might notice unchanged values itself.
SEE ALSO
Gtk2::Adjustment, Gtk2::Ex::WidgetBits
HOME PAGE
http://user42.tuxfamily.org/gtk2-ex-widgetbits/index.html
LICENSE
Copyright 2010, 2011, 2012 Kevin Ryde
Gtk2-Ex-WidgetBits 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-WidgetBits 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-WidgetBits. If not, see http://www.gnu.org/licenses/.