CAD::Drawing::GUI - A can of worms uncapped and recapped.
This module organizes one or more CAD::Drawing::GUI::View objects around one or more CAD::Drawing objects. This should be fun.
Eric L. Wilhelm <ewilhelm at cpan dot org>
This module is copyright (C) 2004-2006 by Eric L. Wilhelm.
This module is distributed under the same terms as Perl. See the Perl source package for details.
You may use this software under one of the following licenses:
(1) GNU General Public License (found at http://www.gnu.org/copyleft/gpl.html) (2) Artistic License (found at http://www.perl.com/pub/language/misc/Artistic.html)
The source code of this module is made freely available and distributable under the GPL or Artistic License. Modifications to and use of this software must adhere to one of these licenses. Changes to the code should be noted as such and this notification (as well as the above copyright information) must remain intact on all copies of the code.
Additionally, while the author is actively developing this code, notification of any intended changes or extensions would be most helpful in avoiding repeated work for all parties involved. Please contact the author with any such development plans.
$gui = CAD::Drawing::GUI->new();
Adds a drawing to the control of the $gui object. Returns the id for this drawing. These id's are not re-used.
$number = $gui->add_drawing($drw, \%options);
Updates all of the canvases with the drawing numbered $n and item $addr.
my $view = $mw->CADView(); $gui->add_view($view);
Creates a new CAD::Drawing::GUI::View object, packs, and returns it. If you want more control, see add_view().
my $view = $gui->new_view($mw, \%options);
Activate the view_bindings for all views (this is done automatically with the new_view() method.)
Activates the default keybindings for all mainwindows.
Esc - Stop current command q - Exit (should this call some hook?)
Activates view-related (zoom, measure, etc) keybindings for all mainwindows.
Returns a hash of the parents of the gui object's views. This hash is keyed by the string representation of the toplevel, and each entry contains an array reference with the toplevel and it's views.
Calls bind_off() for all views.
Calls $view->click_bind() for each active view. See the documentation of CAD::GUI::View ($button is optional and defaults to 1.)