Hi all,
Here's a style shortcut package to complement wxPerl::Constructors
http://scratchcomputing.com/svn/wxPerl-Styles/trunk/
I realize that style('hscroll', te => 'process_enter|multiline') isn't
much shorter than (style => Wx::wxHSCROLL()|Wx::wxTE_PROCESS_ENTER()|
Wx::wxTE_MULTILINE()), but shortness is only an interim goal. By
processing the constants as strings, I'm hoping to enable a better
XRC-like thing. In the meantime, it's shorter enough that I think I
can get all of the style onto one line more often than not.
Thoughts?
This is copied from the documentation. See the svn above.
use Wx qw(
ALIGN_RIGHT
);
... wxALIGN_RIGHT ... ;
Becomes:
use Wx ();
use wxPerl::Styles 'wxVal';
... wxVal('align_right') ... ;
use Wx ();
use wxPerl::Constructors;
use wxPerl::Styles 'style';
...
my $text_ctrl = wxPerl::TextCtrl->new($self, 'some text here',
style('hscroll', te => 'process_enter|multiline')
);
Thanks,
Eric
--
Hot dogs: just another condiment.
--Heart-attack Man
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------
|