App-Codit

 view release on metacpan or  search on metacpan

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

		'Highlighting' => ['CoditTagsEditor', @opt]
	)
}

sub ToolItems {
	my $self = shift;
	my @items = $self->SUPER::ToolItems;
	return (@items,
	#	type					label			cmd					icon					help
	[	'tool_separator' ],
	[	'tool_button',		'Copy',		'<Control-c>',		'edit-copy',		'Copy selected text to clipboard'],
	[	'tool_button',		'Cut',		'<Control-x>',		'edit-cut',			'Move selected text to clipboard'],
	[	'tool_button',		'Paste',		'<Control-v>',		'edit-paste',		'Paste clipboard content into document'],
	[	'tool_separator' ],
	[	'tool_button',		'Undo',		'<Control-z>',		'edit-undo',		'Undo last action'],
	[	'tool_button',		'Redo',		'<Control-Z>',		'edit-redo',		'Cancel undo'],
	);
}

=back

=head1 LICENSE

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

				$picker->historyAdd($picker->getHEX);
				$picker->historyUpdate;
			}
		},
	)->pack(@padding, -side => 'left', -expand => 1, -fill => 'x');

	$bframe->Button(
		-text => 'Copy',
		-command => sub {
			if ($picker->validate($color)) {
				$self->clipboardClear;
				$self->clipboardAppend($color);
				$picker->historyAdd($picker->getHEX);
				$picker->historyUpdate;
			}
		},
	)->pack(@padding, -side => 'left', -expand => 1, -fill => 'x');

	my $indicator = $eframe->Label(
		-width => 4,
		-relief => 'sunken',
		-borderwidth => 2,

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

Otherwise it will open in the appropriate application of your desktop.

Clicking the right mouse button will open a context menu with options for opening, copy, cut, paste and delete selected files.

All columns are sortable and sizable. If you left-click the header it will give you options to display hidden files (that start with a dot), Sort case dependant or not and directories first.

The following keyboard shortcuts are available when the file list has the focus:

=over 4

=item CTRL+C		Copy selected files to the file clipboard.

=item CTRL+X		Copy selected files to the file clipboard. Delete them after paste.

=item CTRL+V		Paste files in the file clipboard into the main folder.

=item CTRL+F		Pop the filter entry.

=back

=cut

my @contextmenu = (
	[ 'menu_normal', undef, 'Open', 'fb_open',	'document-open', 'CTRL+SHIFT+I'],
	[ 'menu_separator', undef, 'f1'],

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


	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],
		'fb_paste' => ['clipboardPaste', $b],
		'fb_properties' => ['propertiesPop', $b],
	);
	$self->after(1000, ['load', $b]);
	$self->{BROWSER} = $b;
	
	return $self;
}

sub browser { return $_[0]->{BROWSER} }

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

		-command => sub {
			my ($sel) = $list->selectionGet;
			$self->cmdExecute('edit_insert', 'insert', $sel) if defined $sel;
		},
	)->pack(@padding, -side => 'left', -expand => 1, -fill => 'x');
	$eframe->Button(
		-text => 'Copy',
		-command => sub {
			my ($sel) = $list->selectionGet;
			if (defined $sel) {
				$self->clipboardClear;
				$self->clipboardAppend($sel);
			}
		},
	)->pack(@padding, -side => 'left', -expand => 1, -fill => 'x');

	my $current = '';
	my $l = $page->Label(
		-textvariable => \$current,
	)->pack(-fill => 'x', -pady => 2);
	$self->{INDICATOR} = \$current,

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


=head1 DESCRIPTION

Quick and easy code samples.

=head1 DETAILS

Snippets are shorts pieces of code that you find yourself writing over and over again.
The top side of the panel allows you to manage your collection of snippets.
The bottom side allows you to insert a selected snippet into your document,
copy the snippet to the clipboard or create a new document based on the snippet.
A file dialog is launched and the snippet is saved to the selected file name.
Then it is opened in a new tab.

=cut

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

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

		}
	}
	$l->add($item, -text => $text, @op);
}

sub snippetClipboard {
	my $self = shift;
	my $cur = $self->current;
	return unless defined $cur;
	my $text = $self->snippetGet;
	$self->clipboardClear;
	$self->clipboardAppend($text);
}

sub snippetCopy {
	my $self = shift;
	my $sel = $self->current;
	return unless defined $sel;
	my $text = $self->snippetGet;
	my $new = $self->snippetDialog;
	if (defined $new) {
		$self->snippetAdd($new);



( run in 1.429 second using v1.01-cache-2.11-cpan-df04353d9ac )