Changeset 868


Ignore:
Timestamp:
11/10/08 10:36:20 (3 years ago)
Author:
szabgab
Message:

more documentation

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Padre.pm

    r858 r868  
    3232Windows. 
    3333 
     34=head1 Getting Started 
     35 
     36After installing Padre you can start it by typing B<padre> on the command line. 
     37On Windows that would be Start/Run padre.bat 
     38 
     39By default Padre starts with an editor containing a simple Perl script 
     40and instructions. 
     41 
     42You can edit the file and save it using File/Save (Ctrl-S ). 
     43 
     44You can run the script by pressing Run/Run Script (F5) 
     45 
     46You can start new files File/New (Ctrl-N)  
     47or open existing files File/Open (Ctrl-O). 
     48 
     49By default Padre uses the same perl interpreter fo  
     50executing code that it uses for itself but this will be configurable 
     51later. 
     52 
    3453=head1 FEATURES 
    3554 
     
    4059=head1 DESCRIPTION 
    4160 
     61=head2 Configuration 
     62 
    4263The application maintains its configuration information in a  
    4364directory called F<.padre>. 
     65 
     66 
     67=head2 Files operations 
     68 
     69B<File/New> creates a new empty file. By default Padre assumes this is a perl script. 
     70(TODO later this default will be configurable). 
     71 
     72B<File/Open>  allows you to select brows for a file and select it for opening. 
     73 
     74B<File/Open Selection>, (Ctrl-Shift-O) if there is a selected text this will 
     75try to locate files that match the selction. If the selection looks like a path 
     76Padre will try to open that path either absolute or relative. 
     77If it looks like a module name (Some::Thing) it will try to find the appropriate file 
     78Some/Thing.pm in @INC and open it. 
     79currently this feature opens the firs file encountered.  
     80(TODO it should find all the possibilities and if there are multiple hits 
     81offer the user to choose. This will be especially important if we are  
     82working on a module that is also already installed. Padre might 
     83find the installed version first while we might want to open the  
     84development version.) 
     85 
     86(TODO: when the file is not of perl type we should have other ways to recognize 
     87files from internal naming and have pathes to search. Surprise, not every 
     88language uses @INC.) 
     89 
     90B<File/Close> checks if the file is saved, if it is closes the current tab. 
     91 
     92B<File/Close All> closes all the file (in case they are not saved yet ask for instructions). 
     93 
     94B<File/Close All but Current Document>.  
     95 
     96B<File/Reload File> is interesting if you either made changes and want to discard them 
     97and/or if the file has changed on the disk. If there are unsaved changes Padre will ask  
     98you if you really want to throw them away. (TODO: make a backup of the file before discarding it) 
     99 
     100B<File/Save> Ctrl-S - save the current file. If the buffer has not yet save and has no filename 
     101associated with it, Padre will ask you for a filename. 
     102 
     103B<File/Save As> - Offer the user to select a new filename and save the content under that name. 
     104 
     105B<File/Save All> - Save all the currently opened files. 
     106 
     107B<File/Convert> - Convert line endings to Windows, Unix or Mac Classic style. 
     108(TODO stop the autoconversion of mixed files, just report them.) 
     109 
     110B<Files/Recent Files> - a list of recently opened files to open them easily. 
     111(TODO: update the list when we open a file, not only when opening padre) 
     112(TODO: allow the user to configure size of history) 
     113 
     114B<File/Doc Stats> - just random statistics about the current document. 
     115(TODO: If you miss anything important let us know!) 
     116 
     117B<File/Quit> also called exit. 
     118 
     119 
     120=head2 Simple editing 
     121 
     122The simple editing features (should) provide the expected behavior 
     123for Windows users. 
     124 
     125B<Edit/Undo> Ctrl-Z 
     126 
     127B<Edit/Redo> 
     128 
     129B<Edit/Select All> Ctrl-A , select all the characters in the current document 
     130 
     131B<Edit/Copy> Ctrl-C 
     132 
     133B<Edit/Cut> Ctrl-X 
     134 
     135B<Edit/Paste> Ctrl-V 
     136 
     137 
     138(TODO What is Ctrl-D ?, duplicate the current line?) 
     139 
     140=head2 Mouse right click 
     141 
     142Click on the right button of the mouse brings up a context sensitive menu. 
     143It provides the basic editing functions and will provide other context  
     144sensitive options. 
     145 
     146 
     147=head2 Projects (TODO) 
     148 
     149Padre will have the notion of a Perl project. As we would like  
     150to make things as natural as possible for the perl developer 
     151and we think the distribution methods used for CPAN module are 
     152a good way to handle any project Padre will understand a project 
     153as a CPAN module. This does not mean that you project needs to end 
     154up on CPAN of course. But if your projects directory structure 
     155follows that of the modules on CPAN, Padre will be automtically 
     156recognize it. 
     157 
     158 
     159=head2 Module::Starter 
     160 
     161As a first step in the direction of supporting CPAN-style perl 
     162projects we integrated into Padre the use of L<Module::Starter> 
     163 
     164B<File/New.../Perl Distribution> will bring up a dialog box where 
     165you can select some of the parameters your new project has such 
     166as Name of the Project (e.g. My::Widgets), Author - that is probably  
     167your name, e-mail (your e-mail). 
     168 
     169Builder is the tool that you project is going to use to package itself  
     170and then your user will use to install the project.  
     171Currently L<Module::Build> and L<ExtUtils::MakeMaker> are supported. 
     172(TODO add Module::Install as well). 
     173 
     174License is one of the keywords currently listed in the META.yml spec of 
     175Module::Build. (TODO: update the list or make it dynamic) 
     176 
     177Once you click B<OK>, Module::Starter will create a new  
     178directory called My-Widgets in the parent directory you selected  
     179in the last field. 
     180 
     181=head2 Other 
    44182 
    45183On Strawberry Perl you can associate .pl file extension with 
     
    61199 
    62200You can edit the command line using the Run/Setup menu item. 
     201 
     202=head2 Bookmarks 
     203 
     204B<View/Set Bookmark> (Ctrl-B) brings up a window with a 
     205predefined text containing the file name and line number 
     206(TODO should be the content of the current line). 
     207 
     208B<View/Goto Bookmark> (Ctrl-Shift-B) brings up a window with the 
     209list of available bookmarks. You can select one and press B<OK> 
     210to jump to that location. If the file where the bookmark belongs 
     211to is not open currently, it will be opened and the cursor will 
     212jump to the desired place. 
     213 
     214In both cases while the window is open you can select  
     215existing bookmarks and press the B<Delete> button to remove the 
     216selected one or press B<Delete All> to remove all the existing 
     217bookmarks. 
     218 
     219=head2 Navigation 
    63220 
    64221  Ctr-1          matching brace 
     
    69226  Alt-S          Jump to list of subs window 
    70227   
    71   Ctr-1 .. Ctrl-9 can set markers 
    72   Ctr-Shift-1 .. Ctrl-Shift-9 jump to marker 
    73228   
    74229  Ctr-M Ctr-Shift-M  comment/uncomment selected lines of code 
     
    279434 
    280435=back 
     436 
     437=head1 SQLite 
     438 
     439Padre is using an SQLite database (~/.padre/config.db) for two  
     440things. 
     441Part of the preferences/configuration information is kept there 
     442and it is used for the podreader. 
     443 
     444=head1 Documentation POD reader 
     445 
     446Padre currently can index (the names of) all the modules on 
     447your system and it was planned to have a search capability for 
     448modules/functions/etc. 
    281449 
    282450=head1 Plugins 
     
    639807=head1 Code layout 
    640808 
    641 Padre is the main module that reads/writes the configuration files 
     809Padre.pm is the main module. 
     810 
     811L<Padre::Config> reads/writes the configuration files. 
     812 
    642813There is an SQLite database and a yml file to keep various pices of information 
    643814The SQLite database holds the list of modules available on the system. 
    644815It will also contain indexing of the documentation 
    645 Looking at the X<> entries of modules 
     816Looking at the C<X<>> entries of modules 
    646817List of functions 
    647818 
    648819The yml file contains individual configuration options 
    649820 
    650 Padre::Wx::App is the Wx::App subclass 
    651  
    652 Padre::Wx::MainWindow is the main frame, most of the code is currently there. 
    653  
    654 Padre::Wx::Editor holds an editor text control instance 
    655 (one for each buffer/file) 
     821L<Padre::Document> is an abstraction class to deal with a single document. 
     822 
     823L<Padre::Documents> aggregated the list of all currently open documents. 
     824 
     825L<Padre::DB> is the database abstraction for SQLite. 
     826 
     827L<Padre::PluginManager> locates and loads the plugins. 
     828 
     829L<Padre::PluginBuilder>  
     830 
     831L<Padre::PPI> 
     832 
     833=head2 Wx GUI 
     834 
     835The Padre::WX::* namespace is supposed to deal with all the  
     836wx related code. Outside of that the code is not supposed to 
     837know about wx, but currently it still does.  
     838 
     839L<Padre::Wx::Dialog> is the parent class of all the major dialogs 
     840that are all implemented in modules in the C<Padre::Wx::Dialog::*> 
     841namespace. 
     842 
     843L<Padre::Wx::App> is the L<Wx::App> subclass 
     844 
     845L<Padre::Wx::MainWindow> is the main frame, most of the code is currently there. 
     846 
     847L<Padre::Wx::Editor> holds an editor text control instance (one for each buffer/file). 
     848 
     849L<Padre::Wx::Menu> handles everythin the menu should know and do. 
     850 
     851L<Padre::Wx::ToolBar> handles everythin the toolbar should know and do. 
     852 
     853L<Padre::Wx::Output> - the output window. 
     854 
     855=head2 POD viewer 
    656856 
    657857Padre::Pod::* are there to index and show documentation written in pod. 
     858TODO: One day we might be able to factor it out into a separate pod-viewer class. 
     859 
    658860 
    659861=head1 SUPPORT 
  • trunk/lib/Padre/Pod/Viewer.pm

    r858 r868  
    3333 
    3434=cut 
     35 
    3536sub module_to_path { 
    3637    my ($self, $module) = @_; 
Note: See TracChangeset for help on using the changeset viewer.