Editing
The Perl Lazarus Workshop
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== wxGlade: visual design which emits Perl == [[File:WxgladeWinExample.png|thumb|left|380px|alt=wxGlade running on Windows while designing an interface for a wxPerl application|wxGlade is written using wxPython, but it can save the interface design as XML and emit Perl source code for a wxPerl application.]] wxPerl gives the programmer access to the graphical library, but constructing every interface entirely by hand can involve a large amount of mechanical work. Controls must be created, placed in sizers, connected to parent windows, assigned properties, and adjusted repeatedly as the layout develops. [https://wxglade.sourceforge.net/ wxGlade] provides a visual design environment for wxWidgets applications. It is written using wxPython, but this does not limit it to Python output. It can generate Python, C++, Perl, Lisp, and XRC.<ref>[https://wxglade.sourceforge.net/ wxGlade, project overview]</ref> For the Perl Lazarus Workshop, the critical fact is simple: <blockquote> wxGlade emits Perl. </blockquote> The craftsman can arrange a window visually, save the wxGlade project as a <code>.wxg</code> XML file, and generate a Perl source file containing the corresponding wxPerl classes. This makes possible a RAD-like cycle: # Design or revise the interface in wxGlade. # Save the <code>.wxg</code> project. # Generate Perl. # Inspect the emitted changes. # Add or revise application behavior. # Run the program with Strawberry Perl. # Return to wxGlade when the visual design changes. The [https://github.com/The-Perl-Cottage-Guild/wxPerl-wxGlade-Templates wxPerl and wxGlade template repository] contains example interfaces intended as starting points for this process. The templates include familiar window patterns and historical interface recreations which can be opened in wxGlade, examined, changed, and emitted as Perl. AI tools have also been effective in producing first-draft wxGlade XML files from natural-language descriptions. Those drafts are not final designs. They are materials brought into the workshop. The proper process remains human: # describe the intended interface; # generate or obtain a first-draft <code>.wxg</code> file; # open it in wxGlade; # inspect the hierarchy and properties; # correct the layout; # emit Perl; # wire the application behavior; # review the code; # and test the result. AI may accelerate the preparation of material. It does not determine whether the interface serves the user, whether generated code is safe, or whether the application fulfills its promises. The craftsman remains responsible. Readers who need ideas for first projects may consult [[GUI ideas for use with wxGlade]]. <div style="clear:both;"></div>
Summary:
Please note that all contributions to Perl Guilds - Getting Medieval with Perl may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Perl Guilds - Getting Medieval with Perl:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Tools
What links here
Related changes
Page information