App-PLab
view release on metacpan or search on metacpan
my $scale = $::application-> uiScaling;
$scale = 1 if $scale < 1;
my $tb = $self-> ToolBar;
my $cck = $tb-> insert( Label =>
origin => [ 120 * $scale, 1],
size => [ $tb-> width - 138 * $scale, 36 * $scale],
name => 'PointRef',
text => '0:0',
growMode => gm::Client,
transparent => 1,
color => $self-> {ini}-> {Color_Label},
alignment => ta::Right,
valignment => ta::Center,
font => { style => fs::Bold },
);
$tb-> insert( Widget =>
origin => [ $tb-> width - 18 * $scale, 1],
size => [ 16 * $scale, 36 * $scale],
transparent => 1,
growMode => gm::Right,
name => 'Lookup',
onPaint => sub {
my ( $self, $canvas) = @_;
my ( $x, $y) = $canvas-> size;
$canvas-> color( $w-> {ini}-> {Color_Label});
my @pt = $w-> {ini}-> {forwardLookup} ? (
0, 0.6, 0.5, 0.6, 0.5, 0.75, 0.9, 0.5, 0.5, 0.25, 0.5, 0.4, 0, 0.4
) : (
0.9, 0.6, 0.9, 0.4, 0.5, 0.4, 0.5, 0.25, 0, 0.5, 0.5, 0.75, 0.5, 0.6
bin/MorphometryI view on Meta::CPAN
size => [ 36 * $scale, 36 * $scale],
image => App::PLab::ImageAppGlyphs::icon( bga::drawprocesses),
enabled => 0,
checkable => 1,
checked => 1,
hint => 'Toggle contours tickmarks drawing',
onClick => sub { $self-> iv_togglemode( $iv)},
glyphs => 2,
text => "",
selectable => 0,
transparent => 1,
flat => 1,
borderWidth => 1,
glyphs => 1,
);
$self-> ToolBar-> insert(
SpeedButton =>
name => "CalcStatistics",
origin => [ 162 * $scale, 1],
size => [ 36 * $scale, 36 * $scale],
image => App::PLab::ImageAppGlyphs::icon( bga::calcstatistics),
enabled => 1,
hint => 'Calculate statistics',
onClick => sub { $self-> opt_statistics(); },
text => "",
selectable => 0,
transparent => 1,
flat => 1,
borderWidth => 1,
);
$iv-> {drawmode} = $cck-> checked ? 1 : undef;
init_convex( $w->{ini}->{NumberOfRotations});
}
sub on_destroy
{
my ($w,$i) = ($_[0],$_[0]->{ini});
bin/PrAverB view on Meta::CPAN
['~Properties' => sub { $w-> fig_propdialog( $w-> {selectedRect})}],
],
);
my $scale = $::application-> uiScaling;
$scale = 1 if $scale < 1;
my %btn_profile = (
glyphs => 2,
text => "",
selectable => 0,
transparent => 1,
flat => 1,
size => [ map { $_ * $scale } 36, 36],
borderWidth => 1,
);
$w-> ToolBar-> insert(
[ SpeedButton =>
origin => [ 114 * $scale, 1],
image => App::PLab::ButtonGlyphs::icon( bg::floppy),
hint => 'Save file',
$self-> {dataExt} = 'pls';
my $tb = $self-> ToolBar;
my $scale = $::application-> uiScaling;
$scale = 1 if $scale < 1;
my %btn_profile = (
glyphs => 1,
text => "",
selectable => 0,
transparent => 1,
flat => 1,
size => [ map { $_ * $scale } 36, 36],
borderWidth => 1,
enabled => 0,
);
$tb-> insert(
[ SpeedButton =>
name => "MarkCells",
origin => [120 * $scale, 1],
onClick => sub { $w-> draw_processes} ,
hint => "Draw processes mode",
%btn_profile,
],
[ Label =>
name => "CellsProcesses",
font => { size => 10, pitch => fp::Fixed},
color => cl::Red,
origin => [ 249 * $scale, 8 * $scale],
size => [ 80 * $scale, 20 * $scale],
transparent => 1,
text => "???:???",
valignment => ta::Middle,
],
[ Widget =>
name => "MarkStateEx",
transparent => 1,
origin => [ 336 * $scale, 8 * $scale],
size => [ 20 * $scale, 20 * $scale],
color => 0,
onPaint => sub {
my ( $self, $canvas) = @_;
my $c = $self-> color;
return unless $c;
$canvas-> color( cl::Black);
$canvas-> fill_ellipse( map { $_ * $scale } 10, 10, 10, 10);
$canvas-> color( $c);
$canvas-> fill_ellipse( map { $_ * $scale } 10, 10, 8, 8);
},
],
[ Label =>
name => "MarkState",
autoWidth => 1,
font => { size => 10, pitch => fp::Variable},
transparent => 1,
color => cl::Black,
origin => [ 356 * $scale, 8 * $scale],
height => 20 * $scale,
valignment => ta::Middle,
onMouseDown => sub {
my ( $self, $btn, $mod, $x, $y) = @_;
if ( ! defined( $w-> { markState}) || $w-> { markState} < 16) {
$w-> reset_mark_state(( $mod & km::Shift) ? 'prev' : 'next');
}
}
lib/App/PLab/ImageApp.pm view on Meta::CPAN
size => [ $x - 4, 38 * $scale],
raise => 1,
image => App::PLab::ImageAppGlyphs::image( bga::tile_m),
growMode => gm::GrowHiX | gm::GrowLoY,
);
my %btn_profile = (
glyphs => 2,
text => "",
selectable => 0,
transparent => 1,
flat => 1,
size => [ map { $_ * $scale } 36, 36],
borderWidth => 1,
);
$w-> ToolBar-> insert(
[ SpeedButton =>
origin => [1, 1],
image => App::PLab::ButtonGlyphs::icon( bg::fldropen),
hint => 'Open file',
( run in 0.337 second using v1.01-cache-2.11-cpan-a1d94b6210f )