Rand Stats

GTK::Scintilla

github:azawawi

GTK::Scintilla Build Status Build status

Scintilla editing GTK widget is here :)

Note: This is an experimental proof of concept at the moment.

Example

use v6;

use GTK::Simple::App;
use GTK::Scintilla;
use GTK::Scintilla::Editor;

my $app = GTK::Simple::App.new( title => "Hello GTK + Scintilla!" );

my $editor = GTK::Scintilla::Editor.new;
$editor.size-request(500, 300);
$app.set-content($editor);

$editor.style-clear-all;
$editor.lexer(SCLEX_PERL);
$editor.style-foreground( SCE_PL_COMMENTLINE, 0x008000 );
$editor.style-foreground( SCE_PL_POD        , 0x008000 );
$editor.style-foreground( SCE_PL_NUMBER     , 0x808000 );
$editor.style-foreground( SCE_PL_WORD       , 0x800000 );
$editor.style-foreground( SCE_PL_STRING     , 0x800080 );
$editor.style-foreground( SCE_PL_OPERATOR   , 1 );
$editor.text(q{
# A Perl comment
use Modern::Perl;

say "Hello world";
});

$editor.show;
$app.run;

For more examples, please see the examples folder.

Documentation

Please see the GTK::Scintilla generated documentation.

Installation

Please check GTK::Simple prerequisites section for more information.

To install it using zef (a module management tool bundled with Rakudo Star):

$ zef install GTK::Scintilla

Testing

$ prove -ve "perl6 -Ilib"
$ zef install Test::META
$ AUTHOR_TESTING=1 prove -ve "perl6 -Ilib"

See Also

Author

Ahmad M. Zawawi, azawawi on #perl6

License

MIT License