note
Anonymous Monk
<P><I>How did you learn wxPerl? I really can't find a good book/tutorial anywhere. </i>
<P>Then you're not really looking :)
<P>[Tutorials]: [id://78752|How to RTFM]
<P>[mod://Wx] says <tt>This module comes with extensive documentation in HTML format; you can download it from [http://wxperl.sourceforge.net/]</tt>
<dl><dt>[http://wxperl.sourceforge.net/]
<dd>[http://wxperl.sourceforge.net/manual/manual.html]
<dd>[http://wxperl.sourceforge.net/tutorial/tutorial.html]
<dd>[http://www.perl.com/pub/2001/09/12/wxtutorial1.html|wxPerl: Another GUI for Perl]
<dd><dl><dt>[http://wiki.wxperl.info/]
<dd>[http://wiki.wxperl.info/w/index.php/WxPerlTablet|WxPerlTablet, a kind of WxPerl cheat sheet ]
<dd>[http://www.vromans.org/johan/articles/wxglade.pdf|GUI development with wxGlade] by [http://www.vromans.org/johan/|Johan Vromans]
</dl>
<dd><dl><dt>[http://wxglade.sourceforge.net/|wxGlade: a GUI builder for wxWidgets/wxPython]
<dd>[http://visualwx.altervista.org/|VisualWX Rad with Form Designer (wxWidgets)]
<dd>[http://wxglade.sourceforge.net/tutorial.php|wxGlade Tutorial]
<dd>[http://wiki.wxpython.org/index.cgi/OrganizingYourCode|OrganizingYourCode - wxPyWiki]
<dd>[http://wxglade.sourceforge.net/manual/index.html|wxGlade user manual]
</dl>
<dd><dl><dt>[http://docs.wxwidgets.org/2.8.4/wx_contents.html]
<dd><dl><dt>[http://docs.wxwidgets.org/stable/wx_overviews.html|Topic overviews]
<dd>[http://docs.wxwidgets.org/stable/wx_roughguide.html|Writing a wxWidgets application: a rough guide]
<dd>[http://docs.wxwidgets.org/stable/wx_sizeroverview.html|Laying out window elements with sizers]
<dd>[http://docs.wxwidgets.org/stable/wx_eventhandlingoverview.html|Event handling overview]
<dd>[http://docs.wxwidgets.org/trunk/overview_events.html|Events and Event Handling]
</dl></dl>
<dd>[http://prdownloads.sourceforge.net/wxperl/wxPerl-0.82-wx-2.8.7-docs-chm.chm|Microsoft HTML Help (CHM) format]
<dd>[http://prdownloads.sourceforge.net/wxperl/wxPerl-0.82-wx-2.8.7-docs-html.zip|ZIP file containing HTML documentation]
<dd>PPM binary packages built by Mark Dootson can be downloaded from the [http://www.wxperl.co.uk/|wxPerl Binary Oasis]
<dd>[irc://irc.perl.org/#wxperl] or [http://widget.mibbit.com/?server=irc.perl.org&channel=%23wxperl|#wxperl channel using Mibbit]
</dl>
<dl>
<dt>[href://Tutorials#User-Interfaces|Tutorials]: [id://587255|User Interfaces]: [id://520074|wxPerl Tutorials]
<dd>[id://112297|wxPerl Tutorial one :: The basics] by [boo_radley]
<dd>[id://112816|wxPerl image handling (short & sweet).] by [boo_radley]
<dd>[id://122227|wxPerl tutorial 3 --] by [boo_radley]
<dd>[id://215789|Wx ControlTutorial : Wx::ProgressDialog] by [boo_radley]
<dt>[mod://Wx::Demo]/[mod://wxperl_demo]
<dd><tt>wxperl_demo --show [mod://Wx::TreeListCtrl|wxTreeListCtrl]</tt>
<dd>[mod://Wx::App::Mastermind] a nontrivial example of wxPerl threads
<dt>[href://?node_id=3989;HIT=Wx;re=N]
<dd>[id://916334|Is wxPropertyGrid available under WxPerl?]
<dd>[id://915597]<C>#!/usr/bin/perl --
use strict;
use warnings;
use Wx;
use Wx::Demo;
my $app = Wx::SimpleApp->new;
my $demo = Wx::Demo->new;
$demo->show_module( 'Wx::DemoModules::wxRichTextCtrl');
$demo->show_demo_window;
$app->MainLoop;
exit( 0 );</c>
<dd>[id://758548|RFC for Tutorials: Using BoxSizer Layout Manager in wxPerl]
<dd><dl><dt>[id://858903|Re^5: Packaging Perl Programs (is) Painful]
<dd><blockquote>
<i>and GTK2::GladeXML both fell into the category of unbuildable last time I tried on Win32</i><P>
Yes, its a huge negative that there aren't ppms for the various Gtk2..., but there is hope, See [id://783422]
<p>
<i>I think Wx looks great and has the functionality I'd need, but all of the existing documentation is for the C++ version. You need to translate it to perl, and not all concepts map cleanly from one language to the other. And as the original poster pointed out, it's not trivial to deploy a WxPerl application. </i><P>
They map well enough , honest. Start with [http://wxperl.sourceforge.net/tutorial/tutorial1.html]
<P>
Then download [http://wxperl.sourceforge.net/download.html#Documentation|chm file here],
[http://search.cpan.org/dist/Wx-Demo|Wx-Demo], and dont forget about the [http://search.cpan.org/dist/Wx/MANIFEST|samples]
<p>
Short version, wxFrame in perl is Wx::Frame, methods are called using arrow not dot.
<p>
For all other differences the documentaion contains notes [http://docs.wxwidgets.org/2.6/wx_wxwindow.html#wxwindowclienttoscreen|like this]
<blockquote>
<A NAME="wxwindowclienttoscreen"></A>
<H3>wxWindow::ClientToScreen</H3>
<P>
<B>virtual void</B> <B>ClientToScreen</B>(<B>int* </B><I>x</I>, <B>int* </B><I>y</I>) <B>const</B><P>
<B><FONT COLOR="#0000C8">wxPerl note:</FONT></B> In wxPerl this method returns a 2-element list instead of
modifying its parameters.<P>
<B>virtual wxPoint</B> <B>ClientToScreen</B>(<B>const <A HREF="wx_wxpoint.html#wxpoint">wxPoint</A>&</B></B><I> pt</I>) <B>const</B><P>
Converts to screen coordinates from coordinates relative to this window.<P>
<I>x</I><UL><UL>
A pointer to a integer value for the x coordinate. Pass the client coordinate in, and
a screen coordinate will be passed out.</UL></UL>
<P>
<I>y</I><UL><UL>
A pointer to a integer value for the y coordinate. Pass the client coordinate in, and
a screen coordinate will be passed out.</UL></UL>
<P>
<I>pt</I><UL><UL>
The client position for the second form of the function.</UL></UL>
<P>
<B><FONT COLOR="#0000C8">wxPython note:</FONT></B> In place of a single overloaded method name, wxPython
implements the following methods:<P>
<UL><UL>
<TABLE>
<TR><TD VALIGN=TOP>
<B>ClientToScreen(point)</B>
</FONT></TD>
<TD VALIGN=TOP>
Accepts and returns a wxPoint
</FONT></TD></TR>
<TR><TD VALIGN=TOP>
<B>ClientToScreenXY(x, y)</B>
</FONT></TD>
<TD VALIGN=TOP>
Returns a 2-tuple, (x, y)
</FONT></TD></TR>
</TABLE>
</UL></UL>
<P>
</blockquote>
so in wxperl this maps pretty much the same.
So you can use any of these
<C>
$ perl -MWx -le"print for Wx::Window->new->ClientToScreen( 0,0 )"
0
0
$ perl -MWx -le"print for Wx::Window->new->ClientToScreen( [0,0] )"
Wx::Point=SCALAR(0x98a3c4)
$ perl -MWx -le"print for Wx::Window->new->ClientToScreen( Wx::Point->new( 0,0 ) )"
Wx::Point=SCALAR(0xda76e4)
</c>
In perl <C>[ -1, -1 ]</C> is a shortcut for
[http://docs.wxwidgets.org/2.6/wx_wxpoint.html#wxpoint|wxPoint] or [http://docs.wxwidgets.org/2.6/wx_wxsize.html#wxsize|wxSize] depending on context.
<p>
Heres a hint to how wxPerl does overloading
<C>
$ perl -MWx -le"print for grep /clienttoscreen/i, keys %Wx::Window::"
ClientToScreenPoint
ClientToScreen
ClientToScreenXY
</c>
So you could also write
<C>
$ perl -MWx -le"print for Wx::Window->new->ClientToScreenXY( 0,0 )"
0
0
$ perl -MWx -le"print for Wx::Window->new->ClientToScreenPoint( [0,0] )"
Wx::Point=SCALAR(0x3e8b64)
$ perl -MWx -le"print for Wx::Window->new->ClientToScreenPoint( Wx::Point->new( 0,0 ) )"
Wx::Point=SCALAR(0x9cf5c4)
</C>
</blockquote>
</dl>
<dd>...
</dl>
912417
917951
12