10 Jun 2011 01:41:41 UTC
- Distribution: Gtk2-Ex-History
- Module version: 8
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (1059 / 1 / 1)
- KwaliteeBus factor: 1
- 87.50% Coverage
- License: open_source
- Perl: v5.8.0
- Activity24 month
- Download (52.88KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionKRYDE Kevin Rydeand 1 contributors
- Kevin Ryde
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
Gtk2::Ex::History::Action -- Gtk2::Action to go back or forward in a history
use Gtk2::Ex::History::Action; my $action = Gtk2::Ex::History::Action->new (name => 'ForwardInHistory', way => 'forward', history => $my_history); $actiongroup->add_action_with_accel ($action, '<Ctrl><Shift>F');
Gtk2::Ex::History::Actionis a subclass of
Gtk2::Widget Gtk2::Action Gtk2::Ex::History::Action
forwardon a given
Gtk2::Ex::History. The "stock" icon and tooltip follow the direction. The action is insensitive when the history is empty.
When the action is used on a toolbar button a mouse button-3 handler is added to popup
If you're not using UIManager and its actions system then see Gtk2::Ex::History::Button for similar button-3 behaviour.
There's no accelerator keys offered as yet. "B" and "F" would be natural, but would depend what other things are in the UIManager and whether letters should be reserved for text entry etc, or are available as accelerators. Control-B and Control-F aren't good choices if using a text entry as they're cursor movement in the Emacs style /usr/share/themes/Emacs/gtk-2.0-key/gtkrc.
$action = Gtk2::Ex::History::Action->new (key => value, ...)
Create and return a new action object. Optional key/value pairs set initial properties per
historyproperty is what to act on, and
wayfor back or forward. The usual action
nameproperty should be set to identify it in a UIManager or similar. The name can be anything desired. Just "Back" and "Forward" are good, or something more to distinguish it from other actions.
my $action = Gtk2::Ex::History::Action->new (name => 'ForwardHistory', way => 'forward', history => $history);
The history object to act on.
Gtk2::Ex::History::Way, default 'back')
The direction to go, either "back" or "forward".
The "stock" icon is set from this, either
Gtk2-Ex-History is Copyright 2010, 2011 Kevin Ryde
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/.
Module Install Instructions
To install Gtk2::Ex::History, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Gtk2::Ex::History
For more information on module installation, please visit the detailed CPAN module installation guide.