Name
	Tie::Wx::Widget - get/set main value of a Wx widget with less syntax and more magic

USAGE

	use Tie::Wx::Widget;

	tie $tiedwidget, Tie::Wx::Widget, $widget;

	$tiedwidget = 7;       # instead of $widgetref->SetValue(7);

	say $tiedwidget;       # instead of say $widgetref->GetValue;

	untie $tiedwidget;     # now $tiedwidget is a normal scalar again (not required)


CALLBACKS

Often are the widget values couples with each other. For instance in
App::Spirograph is a slider which max value is dependent on the value
of another slider. Once you know this, why keep track of it and change
the range of the second slider by hand any given time?

	tie $tslider, 
		Tie::Wx::Widget, 
		$slider, 
		sub { $subslider->SetRange(1,$_) };

$_ holds the assigned value.

The complete API is:

	tie $tiedwidget, Tie::Wx::Widget, $widget, &$do_when_assign, &$do_when_retrieve;


WARNINGS

Your program will die, if you don't provide a proper Wx widget,
that has a GetValue and SetValue method. Unless you init with:

	use Tie::Wx::Widget 'warn_mode';

or do later:

	Tie::Wx::Widget::warn_mode();

Then will be called warn instead of die. 
But you can switch anytime back with:

	Tie::Wx::Widget::die_mode();

Wich has only effect for all variables afterwards.
Because if the Wx ref is not good there will be no tying anyway.


INTERNALS

	# how to get a reference to the Tie::Wx::Widget object ?
	$tieobject = tie $tiedwidget, Tie::Wx::Widget, $widget;
	$tieobject = tied $tiedwidget;

	# now you even can:
	$tieobject->FETCH()
	# aka:
	$tieobject->{'widget'}->GetValue;
	# or do any other method on the wx object
	$tieobject->{'w'}->Show(0);
	# works too  (hides the widget)
	$tieobject->STORE(7);

	# doesn't do anything
	$tieobject->DESTROY()


INSTALLATION

To install this module, run the following commands:

	perl Makefile.PL
	make
	make test
	make install

SUPPORT AND DOCUMENTATION

After installing, you can find documentation for this module with the
perldoc command.

    perldoc Tie::Wx::Widget

You can also look for information at:

    RT, CPAN's request tracker (report bugs here)
        http://rt.cpan.org/NoAuth/Bugs.html?Dist=Tie-Wx-Widget

    AnnoCPAN, Annotated CPAN documentation
        http://annocpan.org/dist/Tie-Wx-Widget

    CPAN Ratings
        http://cpanratings.perl.org/d/Tie-Wx-Widget

    Search CPAN
        http://search.cpan.org/dist/Tie-Wx-Widget/

	Source Repository:

		http://bitbucket.org/lichtkind/tie-wx-widget

LICENSE AND COPYRIGHT

Copyright (C) 2011 Herbert Breunung

This program is free software; you can redistribute it and/or modify it
under the terms of either: the GNU General Public License as published
by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

