GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  TK::ACTION (3)

.ds Aq ’

NAME

Tk::Action - action abstraction for tk

CONTENTS

VERSION

version 1.093390

SYNOPSIS



    my $action = Tk::Action->new(
        window   => $mw,
        callback => \&jfdi,
    );
    $action->add_widget( $menu_entry );
    $action->add_widget( $button );
    $action->add_binding( <Control-F> );
    $action->enable;
    ...
    $action->disable;



DESCRIPTION

Menu entries are often also available in toolbars or other widgets. And sometimes, we want to enable or disable a given action, and this means having to update everywhere this action is allowed.

This module helps managing actions in a Tk GUI: just create a new object, associate some widgets and bindings with add_widget() and then de/activate the whole action at once with enable() or disable().

ATTRIBUTES

    callback

The callback associated to the action. It is needed to create the shortcut bindings. Required, no default.

    window

The window holding the widgets being part of the action object. It is needed to create the shortcut bindings. Required, no default.

METHODS

CW$action->add_widget( CW$widget );

Associate $widget with $action. Enable or disable it depending on current action status.

CW$action->rm_widget( CW$widget );

De-associate $widget from C$<action>.

CW$action->add_binding( CW$binding );

Associate $binding with $action. Enable or disable it depending on current action status. $binding is a regular binding, as defined by Tk::bind.

It is not possible to remove a binding from an action.

CW$action->enable;

Activate all associated widgets and shortcuts.

CW$action->disable;

De-activate all associated widgets and shortcuts.

SEE ALSO

You can look for information on this module at:
o Search CPAN

<http://search.cpan.org/dist/Tk-Action>

o See open / report bugs

<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Tk-Action>

o Git repository

<http://github.com/jquelin/tk-action>

o AnnoCPAN: Annotated CPAN documentation

<http://annocpan.org/dist/Tk-Action>

o CPAN Ratings

<http://cpanratings.perl.org/d/Tk-Action>

AUTHOR



  Jerome Quelin



COPYRIGHT AND LICENSE

This software is copyright (c) 2009 by Jerome Quelin.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 TK::ACTION (3) 2009-12-05

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.