line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Copyright 2010, 2011, 2012 Kevin Ryde |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# This file is part of Gtk2-Ex-WidgetBits. |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# Gtk2-Ex-WidgetBits is free software; you can redistribute it and/or modify |
6
|
|
|
|
|
|
|
# it under the terms of the GNU General Public License as published by the |
7
|
|
|
|
|
|
|
# Free Software Foundation; either version 3, or (at your option) any later |
8
|
|
|
|
|
|
|
# version. |
9
|
|
|
|
|
|
|
# |
10
|
|
|
|
|
|
|
# Gtk2-Ex-WidgetBits is distributed in the hope that it will be useful, but |
11
|
|
|
|
|
|
|
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
12
|
|
|
|
|
|
|
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
13
|
|
|
|
|
|
|
# for more details. |
14
|
|
|
|
|
|
|
# |
15
|
|
|
|
|
|
|
# You should have received a copy of the GNU General Public License along |
16
|
|
|
|
|
|
|
# with Gtk2-Ex-WidgetBits. If not, see . |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
package Gtk2::Ex::LayoutBits; |
19
|
1
|
|
|
1
|
|
888
|
use 5.008; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
48
|
|
20
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
21
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
44
|
|
22
|
|
|
|
|
|
|
|
23
|
1
|
|
|
1
|
|
5
|
use Exporter; |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
176
|
|
24
|
|
|
|
|
|
|
our @ISA = ('Exporter'); |
25
|
|
|
|
|
|
|
our @EXPORT_OK = qw(move_maybe); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
our $VERSION = 48; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
# uncomment this to run the ### lines |
30
|
|
|
|
|
|
|
#use Smart::Comments; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub move_maybe { |
33
|
0
|
|
|
0
|
1
|
|
my ($layout, $child, $x, $y) = @_; |
34
|
|
|
|
|
|
|
### LayoutBits move_maybe()... |
35
|
0
|
0
|
0
|
|
|
|
if ($layout->child_get_property($child,'x') != $x |
36
|
|
|
|
|
|
|
|| $layout->child_get_property($child,'y') != $y) { |
37
|
|
|
|
|
|
|
### move to: "$x,$y" |
38
|
0
|
|
|
|
|
|
$layout->move ($child, $x, $y) |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
__END__ |