Changes between Version 10 and Version 11 of PadrePluginCookbook02


Ignore:
Timestamp:
07/16/11 10:02:09 (3 years ago)
Author:
bowtie
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PadrePluginCookbook02

    v10 v11  
    11[[PageOutline(1-4)]] 
     2[wiki:PadrePluginDialog <-menu] 
    23= Padre::Plugin::Cookbook Recipe-02 
    34* 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. 
    45* You can either svn Padre::Plugin::Cookbook or build your own with Cookbook02.zip in Attachments. 
    5  
     6---- 
    67== Step 1 - Create Skeleton 
    78Padre can do this for you see [wiki:Features/ProjectSkeletonGeneration Project Skeleton Generation] 
     
    2223└── t 
    2324}}} 
    24  
     25---- 
    2526== Step 2 Create MainFB.fbp (xml) 
    2627* Use wxFormBuilder, v3.1.70 
     
    700701* wxALIGN_CENTER centers text 
    701702* proportion = 0, to prevent stretching. 
    702  
     703---- 
    703704== Step 3 {{{Padre::Plugin::FormBuilder}}} 
    704705* Use generator to create MainFB.pm from MainFB.fbp 
    705706 * Tip have {{{Padre::Plugin::Cookbook02.pm}}} Open before running generator. 
    706  
     707---- 
    707708== Step 4 Perl Plug-in Code 
    708709* Read POD for {{{Padre::Plugin}}} 
    709710* 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 
     721my $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---- 
    712732== Step 5 Run 
    713733* perl dev -a -die 
    714734* You should now have Cookbook02 in your Tools menu, enjoy. 
    715  
     735---- 
    716736== Foot Notes 
    717737* YOU MUST REFERENCE this: wxAlphabetical class reference http://docs.wxwidgets.org/stable/wx_classref.html 
     
    744764} 
    745765}}} 
    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 
    765767 
    766768Snippets from {{{Padre::Plugin::Cookbook02::Main}}}