Tk-CodeText

 view release on metacpan or  search on metacpan

CHANGES  view on Meta::CPAN


23 apr 2024
	Update to version 0.49
	Fixed bug with mouse button release

23 apr 2024
	Update to version 0.48
	Fixed bug with modified check.
	added -modifiedcall config variable
	changed background color of TagsEditor
	copy and cut no longer puts an empty string to the clipboard
	mouse button release now causes match

01 apr 2024
	Update to version 0.47
	Revised TagsEditor
	Fixed auto indent.
	Fixed bug with uncommenting.
	Fixed bug with -xmlfolder. -xmldir no longer exists.
	made lnumberCheck a bit quieter.

CHANGES  view on Meta::CPAN

	Rewrote the rules editor, put it in a separate module.
	Numerous small changes and additions

22 April 2003
	Update to version 0.3.1
	Added slant option to rules editor.
	Corrected couple of mistakes in the documentation.

17 April 2003
	Update to version 0.3.0
	Modified clipboard handling.
	Added support for Pod and Xresources files
	Modified plugin protocol
	Modified highlighting algorithm
	Added '-updatecall' option.
	Fixed bug in rules editor.

03 March 2003
	Update to version 0.2.0.
	Updated documentation.
	Renamed a number of methods so they make sense.

lib/Tk/XText.pm  view on Meta::CPAN

sub ClassInit {
	my ($class,$mw) = @_;
	$class->bindRdOnly($mw);
 
	$mw->bind($class,'<Tab>', 'insertTab');
	$mw->bind($class,'<Return>', 'returnPressed');
	$mw->bind($class,'<Delete>','Delete');
	$mw->bind($class,'<BackSpace>','Backspace');
	$mw->bind($class,'<Insert>', 'ToggleInsertMode' ) ;
	$mw->bind($class,'<KeyPress>',['InsertKeypress',Ev('A')]);
	$class->clipboardOperations($mw,'Copy', 'Cut', 'Paste');
	
	$mw->bind($class, '<<Find>>', ['findandreplacepopup', 1]);
	$mw->bind($class, '<<Replace>>', ['findandreplacepopup', 0]);
	$mw->bind($class, '<<Comment>>', 'comment');
	$mw->bind($class, '<<Comment>>', 'comment');
	$mw->bind($class, '<<UnComment>>', 'uncomment');
	$mw->bind($class, '<<Indent>>', 'indent');
	$mw->bind($class, '<<UnIndent>>', 'unindent');
	$mw->bind($class, '<<Undo>>', 'undo');
	$mw->bind($class, '<<Redo>>', 'redo');

lib/Tk/XText.pm  view on Meta::CPAN

sub clearModified {
	my $self = shift;
	$self->Flush;
	$self->editModified(0);
	$self->BufferModified(0);
	my $r = $self->RedoStack;
	my $u = $self->UndoStack;
	for (@$r, @$u) { $_->{'modified'} = 1 }
}

#preventing copy and cut from sending empty string to the clipboard
sub clipboardCopy {
	my $self = shift;
	$self->SUPER::clipboardCopy(@_) if $self->tagRanges('sel');
}
 
sub clipboardCut {
	my $self = shift;
	return $self->clipboardCopy(@_) if $self->cget('-readonly');
	$self->SUPER::clipboardCut(@_) if $self->tagRanges('sel');
}
 
sub clipboardPaste {
	my $self = shift;
	return if $self->cget('-readonly');
	$self->SUPER::clipboardPaste(@_);
}
 
=item B<comment>

=cut

sub comment {
	my $self = shift;
	return if $self->cget('-readonly');
	my $slstart = $self->cget('-slcomment');

lib/Tk/XText.pm  view on Meta::CPAN

	my $iw =  $self->cget('-insertwidth');
	$self->{'ins_width_ins'} = $iw;
	$self->{'ins_width_ovr'} = int($length/8);
}

sub EditMenuItems {
	my $self = shift;
	return (
		["command"=>'~Copy',
			-accelerator => 'CTRL+C',
			-command => [$self => 'clipboardCopy']
		],
		["command"=>'C~ut', 
			-accelerator => 'CTRL+X',
			-command => [$self => 'clipboardCut']
		],
		["command"=>'~Paste', 
			-accelerator => 'CTRL+V',
			-command => [$self => 'clipboardPaste']
		],
		"-",
		["command"=>'~Undo', 
			-accelerator => 'CTRL+Z',
			-command => [$self => 'undo']
		],
		["command"=>'~Redo', 
			-accelerator => 'CTRL+SHIFT+Z',
			-command => [$self => 'redo']
		],



( run in 1.478 second using v1.01-cache-2.11-cpan-84e82930d8c )