NAME
Padre::Current - convenient access to current objects within Padre
SYNOPSIS
my $main = Padre::Current->main;
...
DESCRIPTION
Padre uses lots of objects from different classes. And one needs to have access to the current object of this sort or this other to do whatever is need at the time.
Instead of poking directly with the various classes to find the object you need, Padre::Current
provides a bunch of handy methods to retrieve whatever current object you need.
PUBLIC METHODS
Constructor
Current stuff
Note that you don't need to use an object directly to call those methods, calling them as class methods is ok. For example:
my $doc = Padre::Current->document;
Here's the list of methods provided to get access to current something:
- config()
-
Return the current
Padre::Config
object from the main window. - document()
-
Return the current
Padre::Document
object in use. - editor()
-
Return the current
Padre::Editor
object in use. - filename()
-
Return the filename of the current opened document.
- ide()
-
Return the current
Padre
object in use. - main()
-
Return the current
Padre::Wx::Main
object in use. - notebook()
-
Return the current
Padre::Wx::Notebook
object in use. - project()
-
Return the current
Padre::Project
object in use. - text()
-
Return the current selected text.
- title()
-
Return the title of current editor window.
COPYRIGHT & LICENSE
Copyright 2008-2009 The Padre development team as listed in Padre.pm.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.