~ubuntu-branches/ubuntu/precise/padre/precise

« back to all changes in this revision

Viewing changes to lib/Padre/Wx/Display.pm

  • Committer: Package Import Robot
  • Author(s): Damyan Ivanov
  • Date: 2011-08-28 18:44:38 UTC
  • mfrom: (1.3.2 upstream) (13.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20110828184438-yytfgygb1otbnxoe
Tags: 0.90.ds1-1
* New upstream release
 + update dependencies:
   - add libcapture-tiny-perl 0.06 to Depends
   - add (build-) dependency on libmodule-corelist-perl 2.22 or a suitable
     perl
   - remove module-refresh and module-starter from (build-)dependencies
   - bump (build-)dependency on libppix-editortools-perl to 0.13
   - add (build-)dependency on libprobe-perl-perl
 + update debian/copyright to match the new release

* Move Vcs-Git from apps/ to packages/
* stop removing bundled fork of ORLite::Migrate (now heavily modified)
* update debian/not-real-manual.list
* revert the plugin API version bump
* add Breaks: for incompatible plugin versions
* upload to unstable
* add pod-spelling.patch from upstream
* update disable-tcp-server.patch to apply cleanly

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
use List::Util ();
27
27
use Padre::Wx  ();
28
28
 
29
 
our $VERSION = '0.76';
 
29
our $VERSION = '0.90';
30
30
 
31
31
use constant GOLDEN_RATIO => 1.618;
32
32
 
117
117
        );
118
118
}
119
119
 
 
120
sub dump {
 
121
        my $self     = shift;
 
122
        my @displays = ();
 
123
 
 
124
        # Due to the way it is mapped into Wx.pm
 
125
        # this must NOT be called as a method.
 
126
        my $count = Wx::Display::GetCount();
 
127
 
 
128
        foreach ( 0 .. $count - 1 ) {
 
129
                my $display = Wx::Display->new($_);
 
130
                push @displays,
 
131
                        {
 
132
                        Primary    => $display->IsPrimary,
 
133
                        Geometry   => $self->dump_rect( $display->GetGeometry ),
 
134
                        ClientArea => $self->dump_rect( $display->GetClientArea ),
 
135
                        };
 
136
        }
 
137
        return {
 
138
                Count       => $count,
 
139
                DisplayList => \@displays,
 
140
        };
 
141
}
 
142
 
 
143
sub dump_rect {
 
144
        my $self = shift;
 
145
        my $rect = shift;
 
146
        my %hash = ();
 
147
        foreach (qw{ Top Bottom Left Right Height Width }) {
 
148
                my $method = "Get$_";
 
149
                $hash{$_} = $rect->$method();
 
150
        }
 
151
        return \%hash;
 
152
}
 
153
 
120
154
 
121
155
 
122
156
 
186
220
 
187
221
1;
188
222
 
189
 
# Copyright 2008-2010 The Padre development team as listed in Padre.pm.
 
223
# Copyright 2008-2011 The Padre development team as listed in Padre.pm.
190
224
# LICENSE
191
225
# This program is free software; you can redistribute it and/or
192
226
# modify it under the same terms as Perl 5 itself.