Changeset 11975


Ignore:
Timestamp:
07/24/10 13:08:20 (19 months ago)
Author:
Sewi
Message:

Padre::Current documentation

Location:
trunk/Padre
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Padre/Changes

    r11969 r11975  
    6363      keys of menu_view_mimes() so that the names (not the MIME types) of 
    6464      file types are shown in the View menu (ZENOG) 
     65    - Documentation of Padre::Current (SEWI) 
    6566 
    66670.66 2010.07.01 
  • trunk/Padre/lib/Padre/Current.pm

    r11742 r11975  
    11package Padre::Current; 
    22 
    3 # A context object, for centralising the concept of what is "current" 
     3=pod 
     4 
     5=head1 NAME 
     6 
     7Padre::Current - A context object, for centralising the concept of what is "current" 
     8 
     9=head1 DESCRIPTION 
     10 
     11The C<Padre::Current> detectes and returns whatever is current. Use it whenever you 
     12need to do something with anything which might get a focus or be selectable otherwise 
     13 
     14All methods could be called as functions, methods or class methods. 
     15 
     16=head1 CLASS METHODS 
     17 
     18=head2 C<config> 
     19 
     20    my $config = Padre::Current->config; 
     21 
     22Returns a Padre::Config object for the current document. 
     23 
     24Padre has three types of configuration: User-specific, host-specific and project-specific, 
     25this method returnsa config object which includes the current values - ne need to for you 
     26to care about which config is active and which has priority. 
     27 
     28=head2 C<document> 
     29 
     30    my $document = Padre::Current->document; 
     31 
     32Returns a Padre::Document object for the current document. 
     33 
     34=head2 C<editor> 
     35 
     36    my $editor = Padre::Current->editor; 
     37 
     38Returns a Padre::Editor object for the current editor (containing the current document). 
     39 
     40=head2 C<filename> 
     41 
     42    my $filename = Padre::Current->filename; 
     43 
     44Returns the filename of the current document. 
     45 
     46=head2 C<ide> 
     47 
     48    my $ide = Padre::Current->ide; 
     49 
     50Returns a Padre::Wx object of the current ide. 
     51 
     52=head2 C<main> 
     53 
     54    my $main = Padre::Current->main; 
     55 
     56Returns a Padre::Wx::Main object of the current ide. 
     57 
     58=head2 C<notebook> 
     59 
     60    my $main = Padre::Current->notebook; 
     61 
     62Returns a Padre::Wx::Notebook object of the current notebook. 
     63 
     64=head2 C<project> 
     65 
     66    my $main = Padre::Current->project; 
     67 
     68Returns a Padre::Project object of the current project. 
     69 
     70=head2 C<text> 
     71 
     72    my $main = Padre::Current->text; 
     73 
     74Returns the current selection (selected text in the current document). 
     75 
     76=head2 C<title> 
     77 
     78    my $main = Padre::Current->title; 
     79 
     80Returns the title of the current editor window. 
     81 
     82=cut 
    483 
    584use 5.008; 
Note: See TracChangeset for help on using the changeset viewer.