Changeset 11975
- Timestamp:
- 07/24/10 13:08:20 (19 months ago)
- Location:
- trunk/Padre
- Files:
-
- 2 edited
-
Changes (modified) (1 diff)
-
lib/Padre/Current.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre/Changes
r11969 r11975 63 63 keys of menu_view_mimes() so that the names (not the MIME types) of 64 64 file types are shown in the View menu (ZENOG) 65 - Documentation of Padre::Current (SEWI) 65 66 66 67 0.66 2010.07.01 -
trunk/Padre/lib/Padre/Current.pm
r11742 r11975 1 1 package Padre::Current; 2 2 3 # A context object, for centralising the concept of what is "current" 3 =pod 4 5 =head1 NAME 6 7 Padre::Current - A context object, for centralising the concept of what is "current" 8 9 =head1 DESCRIPTION 10 11 The C<Padre::Current> detectes and returns whatever is current. Use it whenever you 12 need to do something with anything which might get a focus or be selectable otherwise 13 14 All 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 22 Returns a Padre::Config object for the current document. 23 24 Padre has three types of configuration: User-specific, host-specific and project-specific, 25 this method returnsa config object which includes the current values - ne need to for you 26 to care about which config is active and which has priority. 27 28 =head2 C<document> 29 30 my $document = Padre::Current->document; 31 32 Returns a Padre::Document object for the current document. 33 34 =head2 C<editor> 35 36 my $editor = Padre::Current->editor; 37 38 Returns 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 44 Returns the filename of the current document. 45 46 =head2 C<ide> 47 48 my $ide = Padre::Current->ide; 49 50 Returns a Padre::Wx object of the current ide. 51 52 =head2 C<main> 53 54 my $main = Padre::Current->main; 55 56 Returns a Padre::Wx::Main object of the current ide. 57 58 =head2 C<notebook> 59 60 my $main = Padre::Current->notebook; 61 62 Returns a Padre::Wx::Notebook object of the current notebook. 63 64 =head2 C<project> 65 66 my $main = Padre::Current->project; 67 68 Returns a Padre::Project object of the current project. 69 70 =head2 C<text> 71 72 my $main = Padre::Current->text; 73 74 Returns the current selection (selected text in the current document). 75 76 =head2 C<title> 77 78 my $main = Padre::Current->title; 79 80 Returns the title of the current editor window. 81 82 =cut 4 83 5 84 use 5.008;
Note: See TracChangeset
for help on using the changeset viewer.
