NAME
App::Codit::Ext::CoditMDI - Multiple Document Interface for App::Codit
SYNOPSIS
my $app = new App::Codit(@options,
-extensions => ['CoditMDI'],
);
$app->MainLoop;
DESCRIPTION
Inherits Tk::AppWindow::Ext::MDI.
This is a specially crafted multiple document interface for l<App::Codit>.
CONFIG VARIABLES
- -doc_autoindent
-
Sets and returns the autoindent option of the currently selected document.
- -doc_wrap
-
Sets and returns the autoindent option of the currently selected document.
- -doc_view_folds
-
Sets and returns the showfolds option of the currently selected document.
- -doc_view_numbers
-
Sets and returns the shownumbers option of the currently selected document.
- -doc_view_status
-
Sets and returns the showstatus option of the currently selected document.
- -doc_wrap
-
Sets and returns the wrap option of the currently selected document.
COMMANDS
- doc_autoindent
-
Sets and returns the autoindent option of the currently selected document.
- doc_case_lower
-
If there is a selection it turns it to lower case. Else it only turns the character at the insert position to lower case.
- doc_case_upper
-
If there is a selection it turns it to upper case. Else it only turns the character at the insert position to upper case.
- doc_delete
-
Closes the current selected document and deletes the document file from disk. Use with caution.
- doc_delete_dialog
-
Same as doc_delete except it first asks nicely if you really want to do that.
- doc_find
-
Pops up the search bar in the currently selected document.
- doc_fix_indent
-
Asks for the number of spaces per tab and attempts to reformat the indentation taking the indentstyle into account.
If a selection exists it will do this for the selection, otherwise it will scan the whole document.
- doc_get_sel
-
Returns the begin and end index of the current selection.
- doc_get_text $begin, $end
-
Returns the text in the current selected document from index $begin to index $end.
- doc_remove_trailing
-
Removes spaces at the end of each line.
If a selection exists it will do this for the selection, otherwise it will scan the whole document.
- doc_replace
-
Pops up the search and replace bar in the currently selected document.
- doc_wrap
-
Sets and returns the wrap option of the currently selected document.
- edit_delete, $begin, $end
-
Deletes text in the currently selected document. It takes two indices as parameters.
- edit_insert, $index, $text
-
Inserts text in the currently selected document. It takes an index and a string as parameters.
- modified, $doc, $index
-
Called every time you make an edit, it gets a document name and an index as parameters. It checks if there are any macros that should be restarted. Many plugins hook on to this command.
METHODS
- editDelete($begin, $end)
-
Deletes text in the currently selected document. It takes two indices as parameters.
- editInsert($index, $text)
-
Inserts text in the currently selected document. It takes an index and the text parameters.
Macros are callbacks executed in the background. For each line in the document the macro is linked to, the callback is executed with a reference to the text widget and the line number as parameter. the macro ends after the last line has been processed. Codit uses macro callback to do tasks like show leading and trailing tabs and spaces and reparing indentation.
- macroGet($doc, $name)
-
Returns a reference to the macro object $name belonging to $doc.
- macroInit($doc, $name, $call)
-
Creates a new macro object $name for $doc with $call as callback.
- macroList($doc)
-
Returns a list with the objects of loaded macros for $doc.
- macroRemove($doc, $name)
-
Removes macro $name for $doc from the stack.
- macroRemoveAll($doc)
-
Removes all macros for $doc from the stack.
LICENSE
Same as Perl.
AUTHOR
Hans Jeuken (hanje at cpan dot org)
BUGS
Unknown. If you find any, please contact the author.