31 Mar 2014 14:05:04 UTC
- Distribution: Wx-Demo
- Module version: 0.22
- Source (raw)
- Browse (raw)
- How to Contribute
- Clone repository
- Issues (4)
- Testers (122 / 0 / 0)
- KwaliteeBus factor: 3
- 88.40% Coverage
- License: unknown
- Activity24 month
- Download (174.61KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
Wx::Demo - the wxPerl demo
Every demo is a module in the Wx::DemoModules::* namespace. On startup Wx::Demo collects the lits of Demo Modules, tries to load each one of them and displays a list of them based on a categorization within the Demo Modules.
You can also locate Demos based on the widget being use or based on the event used in the example.
Every Demo Module can supply a
tagsmethod that should return extra deep categorization. It should return a reference to a two element array where the first element is the category hierarchy: maincat/subcat and the second element is the title of the given category.
The main categories are hard-coded in the Wx::Demo module (new, controls, windows, etc...)
Every module can have an
add_to_tagsmethod that should return a list of names of the categories the module belongs to so these should be strings such as "new", "control", etc... which are main categories or "control/xyz" which is a subcategory definde by one of the Demo modules.
If there is no add_to_tags or if it does not return anything then the demo can only be found from the list of widgets or events. Currently the reason that some packages might have not add_to_tags method is that some of the demos are implemented as several packages in one file. In such case only the main package has the add_to_tags method as only that needs to be added to the list of demos.
Every module must have a
titlemethod that returns its title. As far as I can see, the titles are usually the same as the filename.
When one of the Demo Modules is selected in the left pane, the Demo will try to execute its
windowand if it does not exists then the
There is also an optional
filemethod in the Demo Modules. I think it is used in case there are more than one Demo Packages in the same file.
Some of the Demo Modules use Wx::DemoModules::lib::BaseModule as a base class.
Mattia Barbon <firstname.lastname@example.org>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.