App-Codit
view release on metacpan or search on metacpan
- Added a bottom bar for plugins Console and PodViewer
- Added bookmarks menu.
- Plugins Bookmarks and WordCompletion now functional.
- Fixed bug in plugin SearchReplace.
- You can now search inside results in plugin SearchReplace.
- Added option to make codit a unique instance.
- Updated manual and documentation
0.09 Sat Jul 27 2024
- added many more components to the About tab.
- added module App::Codit::Macro.
- new method CoditMDI: docCaseLower.
- new method CoditMDI: docCaseUpper.
- new method CoditMDI: docFixIndent.
- new method CoditMDI: docFixIndentCycle.
- new method CoditMDI: docRemoveTrailing.
- new method CoditMDI: docRemoveTrailingCycle.
- new method CoditMDI: macroGet.
- new method CoditMDI: macroInit.
- new method CoditMDI: macroList.
- new method CoditMDI: macroRemove.
- new method CoditMDI: macroRemoveAll.
- new method CoditMDI: spaceMacroAdd.
- new method CoditMDI: spaceMacroCycle.
- new method CoditMDI: spaceMacroRemove.
- new option CoditMDI: -doc_show_spaces.
- new commands CoditMDI: doc_case_upper, doc_case_lower, doc_fix_indent and doc_remove_trailing.
- added their companions in the edit and tool menu.
- added some options to the settings dialog and modified it's layout.
- plugin Git now functional.
- plugin sessions now aware of Console and Git.
- modified context menu of the Navigator tree.
- the manual pdf is now online.
0.08 Wed Jul 10 2024
lib/App/Codit/Ext/CoditMDI.pm
lib/App/Codit/highlight_theme.ctt
lib/App/Codit/Icons/bookmark_delete.png
lib/App/Codit/Icons/bookmark_new.png
lib/App/Codit/Icons/bookmark_next.png
lib/App/Codit/Icons/bookmark_previous.png
lib/App/Codit/Icons/bookmark_remove.png
lib/App/Codit/Icons/bookmarks.png
lib/App/Codit/Icons/git-icon.png
lib/App/Codit/Icons/show-spaces.png
lib/App/Codit/Macro.pm
lib/App/Codit/Plugins/Backups.pm
lib/App/Codit/Plugins/Bookmarks.pm
lib/App/Codit/Plugins/Colors.pm
lib/App/Codit/Plugins/Console.pm
lib/App/Codit/Plugins/Exporter.pm
lib/App/Codit/Plugins/FileBrowser.pm
lib/App/Codit/Plugins/Git.pm
lib/App/Codit/Plugins/Icons.pm
lib/App/Codit/Plugins/PerlSubs.pm
lib/App/Codit/Plugins/PodViewer.pm
lib/App/Codit/Ext/CoditMDI.pm view on Meta::CPAN
use strict;
use warnings;
use Carp;
use vars qw($VERSION);
$VERSION = '0.19';
use base qw( Tk::AppWindow::Ext::MDI );
#require Tk::AppWindow::PluginsForm;
require App::Codit::CoditTagsEditor;
require App::Codit::Macro;
require Tk::YADialog;
my @navcontextmenu = (
[ 'menu_normal', undef, '~Close', 'doc_close', 'document-close', '*CTRL+SHIFT+O'],
[ 'menu_normal', undef, '~Delete', 'doc_delete_dialog', 'edit-delete'],
[ 'menu_separator', undef, 'c1'],
[ 'menu_normal', undef, '~Collapse all', 'nav_collapse'],
[ 'menu_normal', undef, '~Expand all', 'nav_expand'],
);
lib/App/Codit/Ext/CoditMDI.pm view on Meta::CPAN
return unless defined $doc;
$self->docGet($doc)->replace(@_);
}
sub keyReleased {
# my ($self, $name, $key) = @_;
}
=back
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.
=over 4
=item B<macroGet>I<($doc, $name)>
Returns a reference to the macro object $name belonging to $doc.
lib/App/Codit/Ext/CoditMDI.pm view on Meta::CPAN
=item B<macroInit>I<($doc, $name, $call)>
Creates a new macro object $name for $doc with $call as callback.
=cut
sub macroInit {
my ($self, $doc, $name, $call) = @_;
unless (defined $self->macroGet($doc, $name)) {
my $macro = App::Codit::Macro->new($self, $name, $doc, $call);
my $mcr = $self->_mcr;
$mcr->{$doc} = [] unless exists $mcr->{$doc};
my $l = $mcr->{$doc};
push @$l, $macro;
return $macro;
}
warn "macro $name for $doc already exists";
return undef
}
lib/App/Codit/Ext/CoditMDI.pm view on Meta::CPAN
Hans Jeuken (hanje at cpan dot org)
=head1 BUGS
Unknown. If you find any, please report them here L<https://github.com/haje61/App-Codit/issues>.
=head1 SEE ALSO
=over 4
=item L<App::Codit::Macro>
=item L<Tk::AppWindow::Ext::MDI>
=back
=cut
1;
lib/App/Codit/Macro.pm view on Meta::CPAN
package App::Codit::Macro;
=head1 NAME
App::Codit::Macro - Little applets for line to line text tasks.
=cut
use strict;
use warnings;
use vars qw ($VERSION);
$VERSION = '0.19';
use Tk;
=head1 SYNOPSIS
my $macro = $app->mdi->macroInit($docname, 'macroname', ['Some method', $obj]);
$macro->start;
=head1 DESCRIPTION
B<App::Codit::Macro> creates a task that calls the callback on a line to line basis.
It comes in handy for scanning and or modifying a document.
The callback receives the document textmanagers object and the line number as parameters.
The extension CoditMDI uses it for showing tabs and spaces, removing trailing spaces and fix indentation.
=head1 METHODS
=over 4
t/040-App-Codit.t view on Meta::CPAN
use Test::Tk;
use Test::More tests => 20;
use File::Spec;
$mwclass = 'App::Codit';
$delay = 1500;
$quitdelay = 2500;
BEGIN {
use_ok('App::Codit');
use_ok('App::Codit::Ext::CoditMDI');
use_ok('App::Codit::Macro');
};
createapp(
-width => 800,
-height => 600,
-configfolder => File::Spec->rel2abs('t/settings'),
);
my $mdi;
my $macro;
if (defined $app) {
$mdi = $app->extGet('CoditMDI');
$macro = App::Codit::Macro->new($mdi, 'dummy', '', [sub{}]);
}
testaccessors($macro, qw/countref interval last line remain/);
push @tests, (
[ sub {
return $app->extExists('Art')
}, 1, 'Extension Art loaded' ],
[ sub {
return $app->extExists('CoditMDI')
t/040-App-Codit.t view on Meta::CPAN
}, 1, 'Extension Help loaded' ],
[ sub {
return $app->extExists('Settings')
}, 1, 'Extension Settings loaded' ],
[ sub {
return $app->extExists('Plugins')
}, 1, 'Extension Plugins loaded' ],
[ sub {
$mdi->macroInit('Untitled', 'dummy', [sub {}]);
return defined $mdi->macroGet('Untitled', 'dummy');
}, 1, 'Macro dummy initialized' ],
);
starttesting;
( run in 0.480 second using v1.01-cache-2.11-cpan-fd5d4e115d8 )