App-Codit

 view release on metacpan or  search on metacpan

lib/App/Codit.pm  view on Meta::CPAN

=item Select an icon library by using the -icontheme command line option.

=back

=head2 Session will not load

Sometimes it happens that a session file gets corrupted. You solve it like this:

=over 4

=item Launch the session manager. Menu->Session->Manage sessions.

=item Remove the affected session.

=item Rebuild it from scratch.

=back

Sorry, that is all we have to offer.

=head3 Report a bug

lib/App/Codit.pm  view on Meta::CPAN

=item B<Art> see L<Tk::AppWindow::Ext::Art>

=item B<ConfigFolder> see L<Tk::AppWindow::Ext::ConfigFolder>

=item B<Daemons> see L<Tk::AppWindow::Ext::Daemons>

=item B<Help> see L<Tk::AppWindow::Ext::Help>

=item B<Keyboard> see L<Tk::AppWindow::Ext::Keyboard>

=item B<MenuBar> see L<Tk::AppWindow::Ext::MenuBar>

=item B<Panels> see L<Tk::AppWindow::Ext::Panels>

=item B<Plugins> see L<Tk::AppWindow::Ext::Plugins>

=item B<Selector> see L<Tk::AppWindow::Ext::Selector>

=item B<Settings> see L<Tk::AppWindow::Ext::Settings>

=item B<SideBars> see L<Tk::AppWindow::Ext::SideBars>

lib/App/Codit.pm  view on Meta::CPAN


=cut

sub Populate {
	my ($self,$args) = @_;

	my $rawdir = Tk::findINC('App/Codit/Icons');
	my %opts = (
#		-appname => 'Codit',
		-logo => Tk::findINC('App/Codit/codit_logo.png'),
		-extensions => [qw[Art CoditMDI ToolBar StatusBar MenuBar Selector Help Settings Plugins]],
		-documentinterface => 'CoditMDI',
		-namespace => 'App::Codit',
		-rawiconpath => [ $rawdir ],
		-savegeometry => 1,
		-updatesmenuitem => 1,

		#configure the application layout.
		-panelgeometry => 'grid',
		-panellayout => [
			CENTER => {

lib/App/Codit.pm  view on Meta::CPAN

			'*column',
			-linkcolor => ['color', 'Link', -width => 8],
			-contentbookmarkcolor => ['color', 'Bookmark bg', -width => 8],
			'*end',

			'*page' => 'GUI',
			'*section' => 'Icon sizes',
			-iconsize => ['spin', 'General', -width => 4],
			-sidebariconsize => ['spin', 'Side bars', -width => 4],
			'*column',
			-menuiconsize => ['spin', 'Menu bar', -width => 4],
			-tooliconsize => ['spin', 'Tool bar', -width => 4],
			'*end',
			'*section' => 'Visibility at lauch',
			'-tool barvisible' => ['boolean', 'Tool bar'],
			'-status barvisible' => ['boolean', 'Status bar'],
			'*column',
			'-navigator panelvisible' => ['boolean', 'Navigator panel'],
			'*end',
			'*frame',
			'*section' => 'Geometry',

lib/App/Codit.pm  view on Meta::CPAN

=item B<mdi>

Returns a reference to the CoditMDI extension.

=cut

sub mdi {
	return $_[0]->extGet('CoditMDI');
}

sub MenuItems {
	my $self = shift;
	return ($self->SUPER::MenuItems,
		[ 'menu_normal',		  'appname::h1',	   '~Report a problem',  'report_issue'	],
	)
}

=item B<panels>

Returns a reference to the Panels extension.

=cut

lib/App/Codit/CodeTextManager.pm  view on Meta::CPAN

use base qw(Tk::Derived Tk::AppWindow::BaseClasses::ContentManager);
Construct Tk::Widget 'CodeTextManager';

sub Populate {
	my ($self,$args) = @_;

	$self->SUPER::Populate($args);
	my $ext = $self->Extension;

	my $text = $self->CodeText(
		-contextmenu => $ext->ContextMenu,
		-height => 8,
		-keyreleasecall => ['KeyReleased', $self],
		-logcall => ['log', $self],
		-modifiedcall => ['Modified', $self],
		-saveimage => $ext->getArt('document-save', 16),
		-scrollbars => 'osoe',
		-width => 8,
	)->pack(-expand => 1, -fill => 'both');
	$self->CWidg($text);
	my $xt = $text->Subwidget('XText');

lib/App/Codit/ConfigVariables.pod  view on Meta::CPAN

=back

=item B<-appname> in L<Tk::AppWindow>

Set the name of your application.

If this option is not specified, the name of your application
will be set to the filename of your executable with the first
character in upper case.

=item B<-automenu> in L<Tk::AppWindow::Ext::MenuBar>

Default value 1.

Specifies if the menu items of all extensions should be loaded automatically.

=item B<-autotool> in L<Tk::AppWindow::Ext::ToolBar>

Default value 1.

Specifies if the toolbar items of all extensions should be loaded automatically.

lib/App/Codit/ConfigVariables.pod  view on Meta::CPAN


Default value '#FF0000' (red).

=item B<-extensions> in L<Tk::AppWindow>

Specifies the list of extensions to be loaded.

 my $app = Tk::AppWindow->new(
    -extensions => [ 
       qw/Art ConfigFolder Daemons 
       Help Keyboard MDI MenuBar
       Panels Plugins SDI Selector
       Settings SideBars StatusBar
       ToolBar/
    ],
 );

The following order matters for the buildup of menus and bars.
Only available at create time.

=item B<-filetypes> in L<Tk::AppWindow::Ext::MDI>

lib/App/Codit/ConfigVariables.pod  view on Meta::CPAN


=item B<-helpfile> in L<Tk::AppWindow::Ext::Help>

Point to your help file. Can be a weblink.
If it is a I<.pod> file it will launch a dialog box with
a I<PodText> widget.

=item B<-historymenupath> in L<Tk::AppWindow::Ext::MDI>

Specifies the default location in the main menu of the history menu.
Default value is File::Open recent. See also L<Tk::AppWindow::Ext::MenuBar>.

=item B<-iconpath> in L<Tk::AppWindow::Ext::Art>

Specify a list of folders where your icon libraries are located.
Only available at create time.

=item B<-iconsize> in L<Tk::AppWindow::Ext::Art>

Default is 16.

lib/App/Codit/ConfigVariables.pod  view on Meta::CPAN


=item B<-logo> in L<Tk::AppWindow>

Specifies the image file to be used as logo for your application.
Default value is Tk::findINC('Tk/AppWindow/aw_logo.png').

=item B<-logwarningcall> in L<Tk::AppWindow>

Callback to log warnings.

=item B<-mainmenuitems> in L<Tk::AppWindow::Ext::MenuBar>

Default value [].

Configure your menu here. See the section B<CONFIGURING MENUS> below.

=item B<-maxhistory> in L<Tk::AppWindow::Ext::MDI>

Default value is 12.

=item B<-maxtablength> in L<Tk::AppWindow::Ext::MDI>

Default value 16

Maximum size of the document tab in the document bar.

=item B<-menucolspace> in L<Tk::AppWindow::Ext::MenuBar>

Default value 3

Space between the colums in a menu item.

=item B<-menuiconsize> in L<Tk::AppWindow::Ext::MenuBar>

Default value 16

=item B<-modifiedmonitorinterval> in L<Tk::AppWindow::Ext::MDI>

Default value 25. This means every 25 cycles of the B<Daemons> extension. Specifies the interval for
monitoring the modified status of documents. 

=item B<-namespace> in L<Tk::AppWindow>

lib/App/Codit/ConfigVariables.pod  view on Meta::CPAN

    -contentfont => ['font', 'Font'],
    '*end',
    '*section' => 'Editor settings',
    -contenttabs => ['text', 'Tab size'],
    -contentwrap => ['radio', 'Wrap', [qw[none char word]]],
    '*end',
    '*page' => 'Icons',
    -icontheme => ['list', 'Icon theme', 'available_icon_themes'],
    -iconsize => ['list', 'Icon size', 'available_icon_sizes'],
    '*page' => 'Bars',
    '*section' => 'Menubar',
    -menuiconsize => ['list', 'Icon size', 'available_icon_sizes'],
    '*end',
    '*section' => 'Toolbar',
    -toolbarvisible => ['boolean', 'Visible at launch'],
    -tooliconsize => ['list', 'Icon size', 'available_icon_sizes'],
    -tooltextposition => ['radio', 'Text position', [qw[none left right top bottom]]],
    '*end',
    '*section' => 'Statusbar',
    -statusbarvisible => ['boolean', 'Visible at launch'],
    '*end',

lib/App/Codit/Ext/CoditMDI.pm  view on Meta::CPAN

	my $self = shift;
	my $doc = $self->docSelected;
	if (defined $doc) {
		my $w = $self->docGet($doc)->CWidg;
		$w->bookmarkRemoveAll;
	}
}

sub bookmarkFill {
	my $self = shift;
	my $mnu = $self->extGet('MenuBar');
	my ($menu, $index) = $mnu->FindMenuEntry('Bookmarks');
	my $submenu = $menu->entrycget($index, '-menu');
	my $i = $submenu->index('end');
	if ($i > 7) {
		$submenu->delete(8, 'last');
	}
	my $doc = $self->docSelected;
	if (defined $doc) {
		my $w = $self->docGet($doc)->CWidg;
		my @list = $w->bookmarkList;
		for (@list) {

lib/App/Codit/Ext/CoditMDI.pm  view on Meta::CPAN

		my $macro = $self->macroGet($doc, 'space');
		if (defined $macro) {
			my $line = $macro->widg->linenumber($index);
			$macro->line($line);
			$macro->start;
		}
	}
	return @_;
}

sub ContextMenu {
	my $self = shift;
	return $self->extGet('MenuBar')->menuContext($self->GetAppWindow,
		[ 'menu_normal',    undef,  '~Copy',       '<Control-c>',	 'edit-copy',       '*CTRL+C'],
		[ 'menu_normal',    undef,  'C~ut',        '<Control-x>',	 'edit-cut',        '*CTRL+X'],
		[ 'menu_normal',    undef,  '~Paste',      '<Control-v>',	 'edit-paste',      '*CTRL+V'],
		[ 'menu_separator', undef,  'c1'],
		[ 'menu_normal',    undef,  '~Select all', '<Control-a>',  'edit-select-all', '*CTRL+A'],
		[ 'menu_separator', undef,  'c2'],
		[ 'menu_normal',    undef,  'Co~mment',    '<Control-g>',   undef,            '*CTRL+G'],
		[ 'menu_normal',    undef,  '~Uncomment',  '<Control-G>',   undef,            '*CTRL+SHIFT+G'],
		[ 'menu_separator', undef,  'c3' ],
		[ 'menu_normal',    undef,  '~Indent',     '<Control-j>',   'format-indent-more','*CTRL+J'],

lib/App/Codit/Ext/CoditMDI.pm  view on Meta::CPAN

=cut

sub macroRemoveAll {
	my ($self, $doc) = @_;
	my @list = $self->macroList($doc);
	for (@list) {
		$self->macroRemove($doc, $_->name);
	}
}

sub MenuItems {
	my $self = shift;

	#creating the context menu for the navigator tree
	$self->after(1000, ['navContextMenu', $self]);

	my @items = $self->SUPER::MenuItems;
	return (@items,
		[ 'menu',           undef,             '~Edit'],
		[ 'menu_normal',    'Edit::',           '~Copy',             '<Control-c>',	      'edit-copy',      '*CTRL+C'],
		[ 'menu_normal',    'Edit::',          'C~ut',					          '<Control-x>',			    'edit-cut',	      '*CTRL+X'],
		[ 'menu_normal',    'Edit::',          '~Paste',             '<Control-v>',	      'edit-paste',     '*CTRL+V'],
		[ 'menu_separator', 'Edit::',          'e1' ],
		[ 'menu_normal',    'Edit::',          'U~ndo',              '<Control-z>',       'edit-undo',      '*CTRL+Z'],
		[ 'menu_normal',    'Edit::',          '"~Redo',             '<Control-Z>',       'edit-redo',      '*CTRL+SHIFT+Z'],
		[ 'menu_separator', 'Edit::',          'e2'],
		[ 'menu_normal',    'Edit::',          'Co~mment',           '<Control-g>',       undef,            '*CTRL+G'],

lib/App/Codit/Ext/CoditMDI.pm  view on Meta::CPAN

		[ 'menu_normal',    'Tools::',          'F~ix indentation',   'doc_fix_indent',],
	);
}

sub navCollapse {
	my $self = shift;
	my $tree = $self->Subwidget('NAVTREE');
	$tree->collapseAll;
}

sub navContextMenu {
	my $self = shift;
	my $nav = $self->Subwidget('NAVTREE');
	my @items = @navcontextmenu;

	#checking if Git is loaded;
	my $git = $self->extGet('Plugins')->plugGet('Git');
	push @items, [ 'menu_normal', 'c1', '~Add to project', 'git_add', 'git-icon',] if defined $git;

	my $stack = $self->extGet('MenuBar')->menuStack(@items);
	$nav->configure('-contextmenu', $stack);
}

sub navExpand {
	my $self = shift;
	my $tree = $self->Subwidget('NAVTREE');
	$tree->expandAll;
}

sub SettingsPage {

lib/App/Codit/Plugins/Console.pm  view on Meta::CPAN

use vars qw( $VERSION );
$VERSION = '0.19';

use Config;
my $mswin = $Config{'osname'} eq 'MSWin32';


use base qw( Tk::AppWindow::BaseClasses::Plugin );

require Tk::HList;
require Tk::Menu;
require Tk::LabFrame;
require Tk::NoteBook;
require Tk::Terminal;

=head1 DESCRIPTION

Test your code and run system commands.

Will not load on Windows.

lib/App/Codit/Plugins/Console.pm  view on Meta::CPAN

	my $folder = $self->configGet('-configfolder');
	my $hist = "$folder/console_history";
	my $text = $page->Scrolled('Terminal',
		-width => 8,
		-height => 8,
		-historyfile => $hist,
		-scrollbars => 'oe',
		-linkcall => ['linkSelect', $self],
		-linkreg => qr/[^\s]+\sline\s\d+/,
	)->pack(@pad, -expand => 1, -fill => 'both');
	$text->bind('<Button-3>', [$self, 'popMenu']);
	$self->{TXT} = $text;
	$workdir = $text->cget('-workdir');
	my $sb = $self->sidebars;
	$sb->pageSelectCall('Console', sub { $text->focus });
	$sb->pageUnselectCall('Console', sub { 
		my $w = $self->mdi->docWidget;
		$w->focus if defined $w;
	});
	

lib/App/Codit/Plugins/Console.pm  view on Meta::CPAN

			$self->cmdExecute('doc_open', $file) unless $mdi->docExists($file);
			$self->cmdExecute('doc_select', $file);
			my $widg = $mdi->docGet($file)->CWidg;
			$widg->focus;
			$widg->goTo("$line.0");
			$widg->see("$line.0");
		}
	}
}

sub popMenu {
	my $self = shift;

	#refreshing commands
	my $txt = $self->_txt;
	my $dir = $txt->cget('-workdir');
	my $maketype = '';
	my @menuitems = ();
#	my $iconsize = $self->configGet('-menuiconsize');
	my $iconsize = 16;
	if (-e "$dir/Makefile.PL") {

lib/App/Codit/Plugins/Console.pm  view on Meta::CPAN

	for (sort @tests) {
		my $cmd = $_;
		push @menuitems, ['command', $cmd,
			-command => ['launch', $txt, "$maketype; perl -Mblib t/$cmd"],
#			-image => $self->getArt('application-x-executable-script', $iconsize),
			-label => $cmd,
		];
	}
	my ($x, $y) = $self->pointerxy;
	if (@menuitems) {
		my $menu = $self->Menu(
			-menuitems => \@menuitems,
			-tearoff => 0,
		);
		$menu->bind('<Leave>', sub {
			$menu->unpost;
			$menu->destroy;
		});
		$menu->post($x - 2, $y - 2);
	}
}

lib/App/Codit/Plugins/Exporter.pm  view on Meta::CPAN


=item B<Foreground>

Default color of the text in your image. By default the foreground
color of the Tk::CodeText widget is set.

=item B<Theme file>

Select the Tk::CodeText theme file (extension '.ctt') to use for syntax highlighting.
By default the theme file used in the Tk::CodeText widget is set. You can create your
custom theme file through Menu->Codit->Settings and select the highlighting panel.

=item B<Font>

Set the font used to draw text in your image. By default the font
of the Tk::CodeText widget is set.

=item B<Line numbers>

Tick this if you want line numbers displayed in the left column.

lib/App/Codit/Plugins/Exporter.pm  view on Meta::CPAN

	$self->{LINENUMBERS} = shift if @_;
	return $self->{LINENUMBERS}
}

sub maxwidth {
	my $self = shift;
	$self->{MAXWIDTH} = shift if @_;
	return $self->{MAXWIDTH}
}

sub MenuItems {
	my $self = shift;
	return (
		[ 'menu_normal', 'File::Close', 'Export to ~HTML', 'export_html', 'text-html'],
		[ 'menu_normal', 'File::Close', 'Export to P~NG', 'export_png', 'image-x-generic'],
		[ 'menu_separator', 'File::Close',  'F3'],
	)
}

sub tabstring {
	my $self = shift;

lib/App/Codit/Plugins/FileBrowser.pm  view on Meta::CPAN

	);
	my @op = ();
	for (@images) {
		my ($opt, $icon, $size) = @$_;
		my $img = $self->getArt($icon, $size);
		push @op, $opt, $img if defined $img;
	}

	my $b = $page->FileManager(@op,
		-invokefile => ['fbInvoke', $self],
		-listmenu => $self->extGet('MenuBar')->menuStack(@contextmenu),
		-diriconcall => ['getDirIcon', $self],
		-fileiconcall => ['getFileIcon', $self],
		-linkiconcall => ['getLinkIcon', $self],
		-selectmode => 'extended',
	)->pack(-expand => 1, -fill => 'both');
	$self->cmdConfig(
		'fb_copy' => ['clipboardCopy', $b],
		'fb_cut' => ['clipboardCut', $b],
		'fb_delete' => ['delete', $b],
		'fb_open' => ['fbOpen', $self],

lib/App/Codit/Plugins/Git.pm  view on Meta::CPAN


use strict;
use warnings;
use vars qw( $VERSION );
$VERSION = '0.19';

use base qw( Tk::AppWindow::BaseClasses::Plugin );

require Tk::Adjuster;
require Tk::DocumentTree;
require Tk::Menu;
use File::Basename;

use Config;
my $mswin = $Config{'osname'} eq 'MSWin32';

my @contextmenu = (
	[ 'menu_normal',    undef,  '~Open all files',  'git_open_all',	 'document-open'],
	[ 'menu_normal',    undef,  '~Remove from project',  'git_remove_dialog',	 'edit-delete'],
	[ 'menu_separator', undef,  'c1'],
	[ 'menu_normal',    undef,  '~Collapse all',  'git_collapse'],

lib/App/Codit/Plugins/Git.pm  view on Meta::CPAN


	$self->{PROJECTS} = {};

	my $page = $self->ToolLeftPageAdd('Git', 'git-icon', undef, 'Manage your projects', 250);
	
	my $pframe = $page->Frame->pack(-fill => 'x');
	$pframe->Label(-text => 'Project:')->pack(-side => 'left');

	my $current = '';
	$self->{CURRENT} = \$current;
	my $mb = $pframe->Menubutton(
		-anchor => 'w',
		-textvariable => \$current,
	)->pack(-side => 'left', -expand => 1, -fill => 'x');

	my $menu = $mb->Menu(-tearoff => 0);
	$mb->configure(-menu => $menu);
	$self->{PMENU} = $menu;

	my $nav = $self->extGet('Selector');
	my $gtree = $page->DocumentTree(
		-entryselect => ['selectInternal', $self],
		-diriconcall => ['GetDirIcon', $nav],
		-fileiconcall => ['GetFileIcon', $nav],
		-saveiconcall => ['GetSaveIcon', $nav],
	)->pack(-expand => 1, -fill => 'both');
	my $stack =$self->extGet('MenuBar')->menuStack(@contextmenu);
	$gtree->configure('-contextmenu', $stack);
	$self->{TREE} = $gtree;
	
	$self->after(10, ['doPostConfig', $self]);
	return $self;
}

sub closeDocAfter {
	my ($self, $file) = @_;
	if ($file ne 0) {

lib/App/Codit/Plugins/Git.pm  view on Meta::CPAN

	my $mdi = $self->mdi;
	my @list = $mdi->docFullList;
	for (@list) {
		my $doc = $_;
		my $folder = $self->projectFind($doc);
		if (defined $folder) {
			my $name = $self->projectName($folder);
			$self->projectAdd($name, $folder);
		}
	}
	$self->after(1000, ['navContextMenu', $mdi]);
}

sub fileInAnyProject {
	my ($self, $file) = @_;
	my @list = $self->projectList;
	for (@list) {
		my $project = $_;
		return $project if $self->fileInProject($project, $file)
	}
	return undef

lib/App/Codit/Plugins/Git.pm  view on Meta::CPAN

		'git_remove',
		'git_remove_dialog',
	) {
		$self->cmdRemove($_);
	}
	$self->cmdUnhookAfter('doc_close', 'closeDocAfter', $self);
	$self->cmdUnhookAfter('doc_open', 'openDocAfter', $self);
	$self->cmdUnhookBefore('doc_select', 'selectDocBefore', $self);
	my $flag = $self->SUPER::Unload;
	my $mdi = $self->mdi;
	$self->after(100, ['navContextMenu', $mdi]);
	return $flag;
}

=head1 LICENSE

Same as Perl.

=head1 AUTHOR

Hans Jeuken (hanje at cpan dot org)

lib/App/Codit/Plugins/SearchReplace.pm  view on Meta::CPAN

		-offvalue => '-exact',
		-anchor => 'w',
	)->pack(@padding, -fill => 'x');
	$sb->Checkbutton(
		-variable => \$casesensitive,
		-onvalue => '-case',
		-offvalue => '-nocase',
		-text => 'Case sensitive',
		-anchor => 'w',
	)->pack(@padding, -fill => 'x');
	my $mb = $sb->Menubutton(
#		-relief => 'raised',
		-anchor => 'w',
		-textvariable => \$searchmode,
	)->pack(@padding, -fill => 'x');
	my @menu = ();
	for ($srchcur, $srchall, $srchprj, $srchres) {
		my $mode = $_;
		push @menu, [command => $mode,
			-command => sub { $searchmode = $mode },
		];
	}
	$mb->configure(-menu => $mb->Menu(
		-menuitems => \@menu,
	));


	my $sc = $page->Frame(
		-relief => 'groove',
		-borderwidth => 2,
	)->pack(@padding, -fill => 'x');
	$sc->gridColumnconfigure(0, -weight => 2);
	$sc->gridColumnconfigure(1, -weight => 2);

lib/App/Codit/Plugins/Sessions.pm  view on Meta::CPAN

=item B<session_save_as>

Save current session under a new name.

=back

=cut

sub new {
	my $class = shift;
	my $self = $class->SUPER::new(@_, 'ConfigFolder', 'MenuBar');
	return undef unless defined $self;

	$self->sessionFolder;

	$self->{CURRENT} = '';
	$self->{DATA} = {};

	$self->cmdConfig(
		session_dialog => ['sessionDialog', $self],
		session_fill_menu => ['sessionFillMenu', $self],
		session_new => ['sessionNew', $self],
		session_open => ['sessionOpen', $self],
		session_save => ['sessionSave', $self],
		session_save_as => ['sessionSaveAs', $self],
	);
	$self->cmdHookAfter('set_title', 'AdjustTitle', $self);
	return $self;
}

sub AdjustTitle {

lib/App/Codit/Plugins/Sessions.pm  view on Meta::CPAN

}

sub consoleDir {
	my ($self, $dir) = @_;
	my $console = $self->extGet('Plugins')->plugGet('Console');
	return unless defined $console;
	$console->dirSet($dir) if defined $dir;
	return $console->dirGet;
}

sub MenuItems {
	my $self = shift;
	return (
#This table is best viewed with tabsize 3.
#			 type					menupath			label						cmd						icon					keyb			config variable
		[	'menu', 				undef,			"~Session"],
		[	'menu', 				'Session::',	"~Open session",		'session_fill_menu'],
		[	'menu_normal',		'Session::',	"~New session",		'session_new',			'document-new'],
		[	'menu_separator',	'Session::',	'se1'],
		[	'menu_normal',		'Session::',	"~Save session",		'session_save',		'document-save'],
		[	'menu_normal',		'Session::',	"~Save session as",	'session_save_as',	'document-save'],

lib/App/Codit/Plugins/Sessions.pm  view on Meta::CPAN

}

sub sessionDocList {
	my $self = shift;
	my $interface = $self->mdi->Interface;
	my $disp = $interface->{DISPLAYED};
	my $undisp = $interface->{UNDISPLAYED};
	return @$disp, @$undisp;
}

sub sessionFillMenu {
	my $self = shift;
	my $mnu = $self->extGet('MenuBar');
	my @list = $self->sessionList;
	my $var = $self->sessionCurrent;
# 	print "current $var\n";
	my ($menu, $index) = $mnu->FindMenuEntry('Session::Open session');
	if (defined($menu)) {
		my $submenu = $menu->entrycget($index, '-menu');
		$submenu->delete(1, 'last');
		for (@list) {
			my $f = $_;
			$submenu->add('radiobutton',
				-variable => \$var,
				-value => $f,
				-label => $f,
				-command => sub { $self->sessionOpen($f) }

lib/App/Codit/Plugins/SplitView.pm  view on Meta::CPAN

	$self->cmdHookAfter('doc_open', 'splitOpen', $self);

	$self->cmdConfig(
		split_cancel => ['splitCancel', $self],
		split_horizontal => ['splitHorizontal', $self],
		split_vertical => ['splitVertical', $self],
	);
	return $self;
}

sub MenuItems {
	my $self = shift;
	my $path = 'View::Show navigator panel';
	return (
#This table is best viewed with tabsize 3.
#			 type					 menupath			label	              cmd                icon
		[	'menu_normal', 	 $path,     'Split ~horizontal',		'split_horizontal',   'view-split-left-right'],
		[	'menu_normal', 	 $path,     'Split ~vertical',		  'split_vertical',     'view-split-top-bottom'],
		[	'menu_normal', 	 $path,     'Split ~cancel',		    'split_cancel', ],
		[	'menu_separator',$path,     's1'],
	)

t/040-App-Codit.t  view on Meta::CPAN

	[ sub {
		return $app->extExists('CoditMDI')
	}, 1, 'Extension CoditMDI loaded' ],
	[ sub {
		return $app->extExists('ToolBar')
	}, 1, 'Extension ToolBar loaded' ],
	[ sub {
		return $app->extExists('StatusBar')
	}, 1, 'Extension StatusBar loaded' ],
	[ sub {
		return $app->extExists('MenuBar')
	}, 1, 'Extension MenuBar loaded' ],
	[ sub {
		return $app->extExists('Selector')
	}, 1, 'Extension Selector loaded' ],
	[ sub {
		return $app->extExists('Help')
	}, 1, 'Extension Help loaded' ],
	[ sub {
		return $app->extExists('Settings')
	}, 1, 'Extension Settings loaded' ],
	[ sub {



( run in 1.308 second using v1.01-cache-2.11-cpan-49f99fa48dc )