Gtk2-Ex-History
view release on metacpan or search on metacpan
lib/Gtk2/Ex/History.pm view on Meta::CPAN
# Copyright 2007, 2008, 2009, 2010, 2011 Kevin Ryde
# This file is part of Gtk2-Ex-History.
#
# Gtk2-Ex-History 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-History 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-History. If not, see <http://www.gnu.org/licenses/>.
package Gtk2::Ex::History;
use 5.008;
use strict;
use warnings;
use Gtk2 1.220;
use POSIX ();
use Scalar::Util;
use Gtk2;
use Glib::Ex::SignalBits;
use Glib::Ex::FreezeNotify;
# uncomment this to run the ### lines
#use Smart::Comments;
our $VERSION = 8;
# place-to-icon-pixbuf
# $h->dialog_class, default sub of self
# $h->dialog_popup (parent => ...)
# $h->menu_popup (parent => ..., way => ..., event => ...)
# MenuBits popup_for_event (parent, event)
# place-to-renderers
# place-to-cellinfo
# place-serialize \ or Storable freeze
# place-unserialize /
# place-to-selectiondata
# default place-to-text
# flag for set, or emptiness of SelectionData
# selectiondata-to-place
# Gtk2::SelectionData
use Glib::Object::Subclass
'Glib::Object',
signals => { 'place-to-text' =>
{ param_types => ['Glib::Scalar'],
return_type => 'Glib::String',
flags => ['run-last'],
class_closure => \&_default_place_to_text,
accumulator => \&Glib::Ex::SignalBits::accumulator_first_defined },
'place-equal' =>
{ param_types => ['Glib::Scalar', 'Glib::Scalar'],
return_type => 'Glib::Boolean',
flags => ['run-last'],
class_closure => \&_default_place_equal,
accumulator => \&Glib::Ex::SignalBits::accumulator_first },
},
properties => [ Glib::ParamSpec->scalar
('current',
'Current place object',
'Current place object in the history.',
Glib::G_PARAM_READWRITE),
Glib::ParamSpec->int
('max-history',
'Maximum history count',
'The maximum number of places to keep in the history (backwards and forwards counted separately currently).',
0, # min
POSIX::INT_MAX(), # max
40, # default
Glib::G_PARAM_READWRITE),
# this one not documented yet ...
Glib::ParamSpec->boolean
('use-markup',
'Use markup',
'Blurb.',
0, # default
Glib::G_PARAM_READWRITE),
];
BEGIN {
Glib::Type->register_enum ('Gtk2::Ex::History::Way',
back => 0,
forward => 1);
}
( run in 1.511 second using v1.01-cache-2.11-cpan-364913b4093 )