~ubuntu-branches/ubuntu/saucy/padre/saucy-proposed

« back to all changes in this revision

Viewing changes to share/examples/wx/30_editor.pl

  • Committer: Package Import Robot
  • Author(s): Dominique Dumont, gregor herrmann, Dominique Dumont
  • Date: 2012-01-04 12:04:20 UTC
  • mfrom: (1.3.3)
  • Revision ID: package-import@ubuntu.com-20120104120420-i5oybqwf91m1d3il
Tags: 0.92.ds1-1
[ gregor herrmann ]
* Remove debian/source/local-options; abort-on-upstream-changes
  and unapply-patches are default in dpkg-source since 1.16.1.
* Swap order of alternative (build) dependencies after the perl
  5.14 transition.

[ Dominique Dumont ]
* Imported Upstream version 0.92.ds1
* removed fix-spelling patch (applied upstream)
* lintian-override: use wildcard to avoid listing a gazillion files
* updated size of some 'not-real-man-page' entries
* rules: remove dekstop cruft (replaced by a file provided in debian
  directory)
* control: removed Breaks statement. Add /me to uploaders. Updated
  dependencies
* rules: make sure that non-DFSG file (i.e. the cute butterfly, sigh)
  is not distributed

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
 
37
37
use Wx ':everything';
38
38
use Wx::Event ':everything';
39
 
use Wx::STC ();
40
 
 
 
39
use Wx::Scintilla ();
41
40
 
42
41
use File::Spec::Functions qw(catfile);
43
42
use File::Basename qw(basename);
44
43
 
45
 
 
46
44
use base 'Wx::Frame';
47
45
 
48
46
our $VERSION = '0.01';
283
281
}
284
282
 
285
283
#####################
 
284
 
286
285
package Demo::Panel;
 
286
 
287
287
use strict;
288
288
use warnings FATAL => 'all';
289
 
 
290
 
our $VERSION = '0.01';
291
 
use Wx::STC;
292
 
use base 'Wx::StyledTextCtrl';
293
 
 
 
289
use Wx::Scintilla;
 
290
use base 'Wx::Scintilla::TextCtrl';
294
291
use Wx ':everything';
295
292
use Wx::Event ':everything';
296
293
 
 
294
our $VERSION = '0.01';
 
295
 
297
296
sub new {
298
297
        my ( $class, $parent ) = @_;
299
298
        my $self = $class->SUPER::new( $parent, -1, [ -1, -1 ], [ 750, 700 ] ); # TODO get the numbers from the frame?
302
301
 
303
302
        $self->SetFont($font);
304
303
 
305
 
        $self->StyleSetFont( wxSTC_STYLE_DEFAULT, $font );
 
304
        $self->StyleSetFont( Wx::Scintilla::STYLE_DEFAULT, $font );
306
305
        $self->StyleClearAll;
307
306
 
308
307
        $self->StyleSetForeground( 0,  Wx::Colour->new( 0x00, 0x00, 0x7f ) );
322
321
        $self->StyleSetForeground( 17, Wx::Colour->new( 0xff, 0x00, 0x7f ) );
323
322
        $self->StyleSetForeground( 18, Wx::Colour->new( 0x7f, 0x7f, 0x00 ) );
324
323
        $self->StyleSetBold( 12, 1 );
325
 
        $self->StyleSetSpec( wxSTC_H_TAG, "fore:#0000ff" );
 
324
        $self->StyleSetSpec( Wx::Scintilla::SCE_H_TAG, "fore:#0000ff" );
326
325
 
327
 
        $self->SetLexer(wxSTC_LEX_PERL);
 
326
        $self->SetLexer(Wx::Scintilla::SCLEX_PERL);
328
327
 
329
328
        $self->SetLayoutDirection(wxLayout_LeftToRight)
330
329
                if $self->can('SetLayoutDirection');