GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  PADRE::CURRENT (3)

.ds Aq ’

NAME

Padre::Current - A context object, for centralising the concept of what is "current"

CONTENTS

DESCRIPTION

The Padre::Current detectes and returns whatever is current. Use it whenever you need to do something with anything which might get a focus or be selectable otherwise

All methods could be called as functions, methods or class methods.

CLASS METHODS

CWconfig



    my $config = Padre::Current->config;



Returns a Padre::Config object for the current document.

Padre has three types of configuration: User-specific, host-specific and project-specific, this method returnsa config object which includes the current values - ne need to for you to care about which config is active and which has priority.

CWdocument



    my $document = Padre::Current->document;



Returns a Padre::Document object for the current document.

CWeditor



    my $editor = Padre::Current->editor;



Returns a Padre::Editor object for the current editor (containing the current document).

CWfilename



    my $filename = Padre::Current->filename;



Returns the filename of the current document.

CWide



    my $ide = Padre::Current->ide;



Returns a Padre::Wx object of the current ide.

CWmain



    my $main = Padre::Current->main;



Returns a Padre::Wx::Main object of the current ide.

CWnotebook



    my $main = Padre::Current->notebook;



Returns a Padre::Wx::Notebook object of the current notebook.

CWproject



    my $main = Padre::Current->project;



Returns a Padre::Project object of the current project.

CWtext



    my $main = Padre::Current->text;



Returns the current selection (selected text in the current document).

CWtitle



    my $main = Padre::Current->title;



Returns the title of the current editor window.

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.

METHODS

    new



    # Vanilla constructor
    Padre::Current->new;
   
    # Seed the object with some context
    Padre::Current->new( document => $document );



The new constructor creates a new context object, it optionally takes one or more named parameters which should be any context the caller is aware of before he calls the constructor.

Providing this seed context allows the context object to derive parts of the current context from other parts, without the need to fall back to the last-resort Padre->ide singleton-fetching method.

Many objects in Padre that are considered to be part of them context will have a current method which automatically creates the context object with it as a seed.

Returns a new <B>Padre::CurrentB> object.

CWide

Return the Padre singleton for the IDE instance.

CWconfig

Returns the current Padre::Config configuration object for the IDE.

CWmain

Returns the Padre::Wx::Main object for the main window.

CWnotebook

Returns the Padre::Wx::Notebook object for the main window.

CWdocument

Returns the active Padre::Document document object.

CWeditor

Returns the Padre::Editor editor object for the active document.

CWfilename

Returns the file name of the active document, if it has one.

CWtitle

Return the title of current editor window.

CWproject

Return the Padre::Project project object for the active document.

CWtext

Returns the selected text, or a null string if nothing is selected.

COPYRIGHT & LICENSE

Copyright 2008-2013 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.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 PADRE::CURRENT (3) 2013-11-09

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.