.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Wx::Scintilla 3pm" .TH Wx::Scintilla 3pm 2024-03-20 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Wx::Scintilla \- Scintilla source code editing component for wxWidgets .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 2 \& #\-\-\-\-> My first scintilla Wx editor :) \& package My::Scintilla::Editor; \& \& use strict; \& use warnings; \& \& # Load Wx::Scintilla \& use Wx::Scintilla (); # replaces use Wx::STC \& use base \*(AqWx::Scintilla::TextCtrl\*(Aq; # replaces Wx::StyledTextCtrl \& \& use Wx qw(:everything); \& use Wx::Event; \& \& # Override the constructor to Enable Perl support in the editor \& sub new { \& my ( $class, $parent ) = @_; \& my $self = $class\->SUPER::new( $parent, \-1, [ \-1, \-1 ], [ 750, 700 ] ); \& \& # Set the font \& my $font = Wx::Font\->new( 10, wxTELETYPE, wxNORMAL, wxNORMAL ); \& $self\->SetFont($font); \& $self\->StyleSetFont( Wx::Scintilla::STYLE_DEFAULT, $font ); \& $self\->StyleClearAll(); \& \& # Set the various Perl lexer colors \& $self\->StyleSetForeground( 0, Wx::Colour\->new( 0x00, 0x00, 0x7f ) ); \& $self\->StyleSetForeground( 1, Wx::Colour\->new( 0xff, 0x00, 0x00 ) ); \& $self\->StyleSetForeground( 2, Wx::Colour\->new( 0x00, 0x7f, 0x00 ) ); \& $self\->StyleSetForeground( 3, Wx::Colour\->new( 0x7f, 0x7f, 0x7f ) ); \& $self\->StyleSetForeground( 4, Wx::Colour\->new( 0x00, 0x7f, 0x7f ) ); \& $self\->StyleSetForeground( 5, Wx::Colour\->new( 0x00, 0x00, 0x7f ) ); \& $self\->StyleSetForeground( 6, Wx::Colour\->new( 0xff, 0x7f, 0x00 ) ); \& $self\->StyleSetForeground( 7, Wx::Colour\->new( 0x7f, 0x00, 0x7f ) ); \& $self\->StyleSetForeground( 8, Wx::Colour\->new( 0x00, 0x00, 0x00 ) ); \& $self\->StyleSetForeground( 9, Wx::Colour\->new( 0x7f, 0x7f, 0x7f ) ); \& $self\->StyleSetForeground( 10, Wx::Colour\->new( 0x00, 0x00, 0x7f ) ); \& $self\->StyleSetForeground( 11, Wx::Colour\->new( 0x00, 0x00, 0xff ) ); \& $self\->StyleSetForeground( 12, Wx::Colour\->new( 0x7f, 0x00, 0x7f ) ); \& $self\->StyleSetForeground( 13, Wx::Colour\->new( 0x40, 0x80, 0xff ) ); \& $self\->StyleSetForeground( 17, Wx::Colour\->new( 0xff, 0x00, 0x7f ) ); \& $self\->StyleSetForeground( 18, Wx::Colour\->new( 0x7f, 0x7f, 0x00 ) ); \& $self\->StyleSetBold( 12, 1 ); \& $self\->StyleSetSpec( Wx::Scintilla::SCE_H_TAG, "fore:#0000ff" ); \& \& # set the lexer to Perl 5 \& $self\->SetLexer(Wx::Scintilla::SCLEX_PERL); \& \& return $self; \& } \& \& #\-\-\-\-> DEMO EDITOR APPLICATION \& \& # First, define an application object class to encapsulate the application itself \& package DemoEditorApp; \& \& use strict; \& use warnings; \& use Wx; \& use base \*(AqWx::App\*(Aq; \& \& # We must override OnInit to build the window \& sub OnInit { \& my $self = shift; \& \& my $frame = Wx::Frame\->new( \& undef, # no parent window \& \-1, # no window id \& \*(AqMy First Scintilla Editor!\*(Aq, # Window title \& ); \& \& my $editor = My::Scintilla::Editor\->new( \& $frame, # Parent window \& ); \& \& $frame\->Show(1); \& return 1; \& } \& \& # Create the application object, and pass control to it. \& package main; \& my $app = DemoEditorApp\->new; \& $app\->MainLoop; .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" While we already have a good scintilla editor component support via Wx::StyledTextCtrl in Perl, we already suffer from an older scintilla package and thus lagging Perl support in the popular Wx Scintilla component. wxWidgets has a *very slow* release timeline. Scintilla is a contributed project which means it will not be the latest by the time a new wxWidgets distribution is released. And on the scintilla front, the Perl 5 lexer is not 100% bug free even and we do not have any kind of Perl 6 support in Scintilla. .PP The ambitious goal of this project is to provide fresh Perl 5 and maybe 6 support in Wx while preserving compatibility with Wx::StyledTextCtrl and continually contribute it back to Scintilla project. .PP Note: You cannot load Wx::STC and Wx::Scintilla in the same application. They are mutually exclusive. The wxSTC_... events are handled by one library or the other. .PP Scintilla 2.28 is now bundled and enabled by default. .SH MANUAL .IX Header "MANUAL" If you are looking for more API documentation, please consult Wx::Scintilla::Manual .SH PLATFORMS .IX Header "PLATFORMS" At the moment, Linux (Debian, Ubuntu, Fedora, CentOS) and Windows (Strawberry and ActivePerl) are supported platforms. My next goal is to support more platforms. Please let me know if you can help out :) .PP On Debian/Ubuntu, you need to install the following via: .PP .Vb 1 \& sudo apt\-get install libgtk2.0\-dev .Ve .PP On MacOS 64\-bit by default you need to install a 32\-bit Perl in order to install wxWidgets 2.8.x. Please refer to for more information. .SH HISTORY .IX Header "HISTORY" wxWidgets 2.9.1 and development have Scintilla 2.03 so far. I searched for Perl lexer changes in scintilla history and here is what we will be getting when we upgrade to 2.26+. .IP "Release 2.26" 4 .IX Item "Release 2.26" Perl folding folds "here doc"s and adds options fold.perl.at.else and fold.perl.comment.explicit. Fold structure for Perl fixed. .IP "Release 2.20" 4 .IX Item "Release 2.20" Perl folder works for array blocks, adjacent package statements, nested PODs, and terminates package folding at DATA, D and Z. .IP "Release 1.79" 4 .IX Item "Release 1.79" Perl lexer bug fixed where previous lexical states persisted causing "/" special case styling and subroutine prototype styling to not be correct. .IP "Release 1.78" 4 .IX Item "Release 1.78" Perl lexer fixes problem with string matching caused by line endings. .IP "Release 1.77" 4 .IX Item "Release 1.77" Perl lexer update. .IP "Release 1.76" 4 .IX Item "Release 1.76" Perl lexer handles defined-or operator "". .IP "Release 1.75" 4 .IX Item "Release 1.75" Perl lexer enhanced for handling minus-prefixed barewords, underscores in numeric literals and vector/version strings, D and Z similar to END, subroutine prototypes as a new lexical class, formats and format blocks as new lexical classes, and '/' suffixed keywords and barewords. .IP "Release 1.71" 4 .IX Item "Release 1.71" Perl lexer allows UTF\-8 identifiers and has some other small improvements. .SH ACKNOWLEDGEMENTS .IX Header "ACKNOWLEDGEMENTS" Neil Hudgson for creating and maintaining the excellent Scintilla project . Thanks! .PP Robin Dunn for the excellent scintilla contribution that he made to wxWidgets. This work is based on his codebase. Thanks! .PP Mark dootson for his big effort to make Wx::Scintilla compilable on various platforms. Big thanks! .PP Heiko Jansen and Gabor Szabo for the idea to backport Perl lexer for wxWidgets 2.8.10 and all of #padre members for the continuous support and testing. Thanks! .SH SUPPORT .IX Header "SUPPORT" Bugs should always be submitted via the CPAN bug tracker .PP .PP For other issues, contact the maintainer. .SH AUTHOR .IX Header "AUTHOR" Ahmad M. Zawawi .PP Mark Dootson .SH "SEE ALSO" .IX Header "SEE ALSO" Wx::Scintilla Manual Wx::Scintilla::Manual .PP wxStyledTextCtrl Documentation .PP Scintilla edit control for Win32::GUI Win32::GUI::Scintilla .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright 2011 Ahmad M. Zawawi. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .PP License for Scintilla .PP Included Scintilla source is copyrighted 1998\-2011 by Neil Hodgson .PP Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. .PP NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.