Tk::CodeText::None - a Plugin for No syntax highlighting


Tk-CodeText documentation Contained in the Tk-CodeText distribution.

Index


Code Index:

NAME

Top

Tk::CodeText::None - a Plugin for No syntax highlighting

SYNOPSIS

Top

 require Tk::CodeText::None;
 my $hl = new Tk::CodeText::None;
 my @line = $hl->highlight($line);

DESCRIPTION

Top

Tk::CodeText::None is some kind of a dummy plugin module. All methods to provide highlighting in a Tk::CodeText widget are there, ready to do nothing.

It only provides those methods, that Tk::CodeText is going to call upon.

METHODS

Top

highlight($string);

returns an empty list.

The description of the remaining methods is more a description of what they are supposed to do if you write your own plugin. These methods actually do as little as possible.

rules($txtwidget,\@rules)

sets and returns a reference to a list of tagnames and options. By default it is set to [ ].

stateCompare(\@state);

Compares two lists, \@state and the stack. returns true if they match.

stateGet

Returns a list containing the entire stack.

stateSet(@list)

Accepts @list as the current stack.

syntax

returns None

AUTHOR

Top

Hans Jeuken (haje@toneel.demon.nl)

BUGS

Top

Unknown.


Tk-CodeText documentation Contained in the Tk-CodeText distribution.
package Tk::CodeText::None;

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

use strict;
use Data::Dumper;

sub new {
   my ($proto, $rules) = @_;
   my $class = ref($proto) || $proto;
	my $self = {};
   bless ($self, $class);
   return $self;
}

sub highlight {
	my $hlt = shift;
	return ();
}

sub rules {
	my $hlt = shift;
	return [];
}

sub stateCompare {
	return 1;
}

sub stateGet {
	my $hlt = shift;
	return ()
}
	
sub stateSet {
	my $hlt = shift;
}

sub syntax {
	my $hlt = shift;
	return 'None'
}

1;

__END__