You know :) I've read a few wxwidgets examples, and I've never needed anything more than the two rules from my wxWidgets / wxPerl / wxGlade tutorial, basically
wxWidget to Wx::Widget , wxWidget( to Wx::Widget->new( s{wx([A-Z]\w+)(\()?}{"Wx::$1" .($2?"->new(":"")}ge; the constructor is called ->new
wxWidget foo means a $foo which is a Wx::Widget object
That's it. There is one more that comes up if you view the c++ examples, and its dot to arrow s{.}{->}g;
Ok, there are two more that everybody knows without trying, its ignore comments // /**/, usually taken care of by viewcvs if you're viewing online, or whatever syntax highlighting editor you're using offline
And ignore stuff in bold :) int *x, const wxPoint& pt
The only real issue I see, is that a lot of classes are stale
OTOH, take for example Wx/XS/Display.xsp its missing
int w()
%code%{ RETVAL = THIS->w;
%};
int h()
%code%{ RETVAL = THIS->h;
%};
int bpp()
%code%{ RETVAL = THIS->bpp;
%};
int refresh()
%code%{ RETVAL = THIS->refresh;
%};
Not a big deal, but this could be automated, much like the wxwidget docs are automated (now with more automation)
And there could be a wxPerlDocs distribution release, that uses File::ShareDir to package up a perl-ified version of the wxwidgets docs, that comes with a wxperldocs command that launches the docs in your favorite browser (mimeopen, openit )
update: http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk/docs/doxygen/scripts/swig_tools.py
http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk/docs/doxygen/
swigtools uses xml generated by doxygen to generate swig, swig can be used to generate perl bindings
without much work, perl-specific docs could be generated, missing member accessors could be exposed, missing methods could be exposed, missing classes could be exposed ...
$ ls -loanh *
-rw-rw-rw- 1 0 47M 2013-03-09 01:04 DoxyDocs.pm
-rw-rw-rw- 1 0 5.2K 2013-03-09 01:04 doxyformat.tex
-rw-rw-rw- 1 0 469 2013-03-09 01:04 doxylatex-structure.pl
-rw-rw-rw- 1 0 2.9K 2013-03-09 01:04 doxylatex.pl
-rw-rw-rw- 1 0 311 2013-03-09 01:04 doxylatex.tex
-rw-rw-rw- 1 0 2.0K 2013-03-09 01:04 doxyrules.make
-rw-rw-rw- 1 0 3.7K 2013-03-09 01:04 DoxyStructure.pm
-rw-rw-rw- 1 0 182 2013-03-09 01:04 Makefile
$ ack name.*bpp -C3 *pm
DoxyDocs.pm
1356519- },
1356520- all_members => [
1356521- {
1356522: name => 'bpp',
1356523- virtualness => 'non_virtual',
1356524- protection => 'public',
1356525- scope => 'wxVideoMode'
--
1356818- },
1356819- {
1356820- kind => 'variable',
1356821: name => 'bpp',
1356822- virtualness => 'non_virtual',
1356823- protection => 'public',
1356824- static => 'no',
http://sourceforge.net/p/wxperl/code/3445/tree/dist-tools/trunk/?? Its unclear how often these beginWxPerlOnly amendments are updated in wxWidgets docs
there is module_info but it doesn't work too well with Wx but these oneliners do :)
perl -MWx -le " $p=q{Wx::Frame}; for(sort keys %Wx::Frame::){ eval{$p-
+>$_((0)x120)}; $@=~s{.at.*$}{}; print qq{$p\n$@\n}; } "
Wx::Frame
Usage: Wx::Frame::Create(THIS, parent, id, title, pos = wxDefaultPosit
+ion, size = wxDefaultSize, style = wxDEFAULT_FRAME_STYLE, name = wxFr
+ameNameStr) at -e line 1.
Wx::Frame
Usage: Wx::Frame::CreateStatusBar(THIS, number = 1, style = 0, id = wx
+ID_ANY, name = wxEmptyString) at -e line 1.
Wx::Frame
Usage: Wx::Frame::CreateToolBar(THIS, style = wxNO_BORDER | wxTB_HORIZ
+ONTAL, id = wxID_ANY, name = wxToolBarNameStr) at -e line 1.
Wx::Frame
Usage: Wx::Frame::GetClientAreaOrigin(THIS) at -e line 1.
Wx::Frame
Usage: Wx::Frame::GetMenuBar(THIS) at -e line 1.
Wx::Frame
Usage: Wx::Frame::GetStatusBar(THIS) at -e line 1.
Wx::Frame
Usage: Wx::Frame::GetStatusBarPane(THIS) at -e line 1.
Wx::Frame
Usage: Wx::Frame::GetTitle(THIS) at -e line 1.
Wx::Frame
Usage: Wx::Frame::GetToolBar(THIS) at -e line 1.
Wx::Frame
Can't locate object method "ISA" via package "Wx::Frame" at -e line 1.
Wx::Frame
Usage: Wx::Frame::OnCreateStatusBar(THIS, number, style, id, name) at
+-e line 1.
Wx::Frame
Usage: Wx::Frame::ProcessCommand(THIS, id) at -e line 1.
Wx::Frame
Usage: Wx::Frame::SendSizeEvent(THIS) at -e line 1.
Wx::Frame
Usage: Wx::Frame::SetIcon(THIS, icon) at -e line 1.
Wx::Frame
Usage: Wx::Frame::SetIcons(THIS, icons) at -e line 1.
Wx::Frame
Usage: Wx::Frame::SetMenuBar(THIS, menubar) at -e line 1.
Wx::Frame
Usage: Wx::Frame::SetStatusBar(THIS, statusBar) at -e line 1.
Wx::Frame
Usage: Wx::Frame::SetStatusBarPane(THIS, n) at -e line 1.
Wx::Frame
Usage: Wx::Frame::SetStatusText(THIS, text, number = 0) at -e line 1.
Wx::Frame
variable is not an object: it must have type Wx::Frame at -e line 1.
Wx::Frame
Usage: Wx::Frame::SetTitle(THIS, title) at -e line 1.
Wx::Frame
Usage: Wx::Frame::SetToolBar(THIS, toolbar) at -e line 1.
Wx::Frame
Usage: Wx::Frame::newFull(CLASS, parent, id, title, pos = wxDefaultPos
+ition, size = wxDefaultSize, style = wxDEFAULT_FRAME_STYLE, name = wx
+FrameNameStr) at -e line 1.
Wx::Frame
Usage: Wx::Frame::newDefault(CLASS) at -e line 1.
Wx::Frame
Usage: Wx::Frame::newFull(CLASS, parent, id, title, pos = wxDefaultPos
+ition, size = wxDefaultSize, style = wxDEFAULT_FRAME_STYLE, name = wx
+FrameNameStr) at -e line 1.