Changes between Version 10 and Version 11 of PadrePluginCookbook02
- Timestamp:
- 07/16/11 10:02:09 (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PadrePluginCookbook02
v10 v11 1 1 [[PageOutline(1-4)]] 2 [wiki:PadrePluginDialog <-menu] 2 3 = Padre::Plugin::Cookbook Recipe-02 3 4 * This page complements {{{Padre::Plugin::Cookbook Recipe-02}}}, it is not meant to be installable, just an aid, with a suggested layout, enjoy. More detail will follow in subsequent Cookbooks. 4 5 * You can either svn Padre::Plugin::Cookbook or build your own with Cookbook02.zip in Attachments. 5 6 ---- 6 7 == Step 1 - Create Skeleton 7 8 Padre can do this for you see [wiki:Features/ProjectSkeletonGeneration Project Skeleton Generation] … … 22 23 └── t 23 24 }}} 24 25 ---- 25 26 == Step 2 Create MainFB.fbp (xml) 26 27 * Use wxFormBuilder, v3.1.70 … … 700 701 * wxALIGN_CENTER centers text 701 702 * proportion = 0, to prevent stretching. 702 703 ---- 703 704 == Step 3 {{{Padre::Plugin::FormBuilder}}} 704 705 * Use generator to create MainFB.pm from MainFB.fbp 705 706 * Tip have {{{Padre::Plugin::Cookbook02.pm}}} Open before running generator. 706 707 ---- 707 708 == Step 4 Perl Plug-in Code 708 709 * Read POD for {{{Padre::Plugin}}} 709 710 * Read POD for Cookbook02.pm and Main.pm 710 * Run Tests, note results, //critiques welcome. 711 711 * Run Tests, note results, //critiques welcome. 712 === output 713 * To use Padre Output window, to talk to our users, or we could just **say** to terminal :) 714 715 1. Open Padre Output window: 716 {{{#!perl 717 $main->show_output(1); 718 }}} 719 1. Create a variable: 720 {{{#!perl 721 my $output = $main->output; 722 }}} 723 1. Clear the Padre Output window. 724 {{{#!perl 725 $output->clear; 726 }}} 727 1. Write to Padre Output window 728 {{{#!perl 729 $output->AppendText("output cliked \n"); 730 }}} 731 ---- 712 732 == Step 5 Run 713 733 * perl dev -a -die 714 734 * You should now have Cookbook02 in your Tools menu, enjoy. 715 735 ---- 716 736 == Foot Notes 717 737 * YOU MUST REFERENCE this: wxAlphabetical class reference http://docs.wxwidgets.org/stable/wx_classref.html … … 744 764 } 745 765 }}} 746 === output 747 * To use Padre Output window, to talk to our users, or we could just **say** to terminal :) 748 749 1. Open Padre Output window: 750 {{{#!perl 751 $main->show_output(1); 752 }}} 753 1. Create a variable: 754 {{{#!perl 755 my $output = $main->output; 756 }}} 757 1. Clear the Padre Output window. 758 {{{#!perl 759 $output->clear; 760 }}} 761 1. Write to Padre Output window 762 {{{#!perl 763 $output->AppendText("output cliked \n"); 764 }}} 766 765 767 766 768 Snippets from {{{Padre::Plugin::Cookbook02::Main}}}
