|
Prima::ScrollBar - standard scroll bars class |
Prima::ScrollBar - standard scroll bars class
The class Prima::ScrollBar implements both vertical and horizontal
scrollbars in Prima. This is a purely Perl class without any
C-implemented parts except those inherited from Prima::Widget.
use Prima::ScrollBar;
my $sb = Prima::ScrollBar-> create( owner => $group, %rest_of_profile);
my $sb = $group-> insert( 'ScrollBar', %rest_of_profile);
my $isAutoTrack = $sb-> autoTrack;
$sb-> autoTrack( $yesNo);
my $val = $sb-> value;
$sb-> value( $value);
my $min = $sb-> min;
my $max = $sb-> max;
$sb-> min( $min);
$sb-> max( $max);
$sb-> set_bounds( $min, $max);
my $step = $sb-> step;
my $pageStep = $sb-> pageStep;
$sb-> step( $step);
$sb-> pageStep( $pageStep);
my $partial = $sb-> partial;
my $whole = $sb-> whole;
$sb-> partial( $partial);
$sb-> whole( $whole);
$sb-> set_proportion( $partial, $whole);
my $size = $sb-> minThumbSize;
$sb-> minThumbSize( $size);
my $isVertical = $sb-> vertical;
$sb-> vertical( $yesNo);
my ($width,$height) = $sb-> get_default_size;
Change notification during mouse tracking events.
Generally it should only be set to 0 on very slow computers.
Default value is 1 (logical true).
Prima::Application-> get_default_scrollbar_metrics. The height is
affected because by default the horizontal ScrollBar will be
created.
value.
Default value: 100.
value.
Default value: 0
Default value: 21
value during ``page''-related operations, for example clicking the mouse
on the strip outside the thumb, or pressing PgDn or PgUp.
Default value: 10
whole below.
Default value: 10
value during mouse/keyboard interaction.
Default value is 1.
min and max, which corresponds directly to the
position of the thumb.
Default value is 0.
Default value is 0 (logical false).
min and max. You may think of the
combination of partial and whole as of the proportion between
the visible size of something (document, for example) and the whole
size of that ``something''. Useful to struggle against infamous ``bird''
size of Windows scrollbar thumbs.
Default value is 100.
Change notification is sent whenever the thumb position of
scrollbar is changed, subject to a certain limitations when autoTrack
is 0. The notification conforms the general Prima rule:
it is sent when appropriate, regardless to whether this was a
result of user interaction, or a side effect of some method
programmer has called.
use Prima; use Prima::Application name => 'ScrollBar test'; use Prima::ScrollBar;
my $w = Prima::Window-> create(
text => 'ScrollBar test',
size => [300,200]);
my $sb = $w-> insert( ScrollBar =>
width => 280,
left => 10,
bottom => 50,
onChange => sub {
$w-> text( $_[0]-> value);
});
run Prima;
Prima, the Prima::Widget manpage, the Prima::IntUtils manpage, examples/rtc.pl, examples/scrolbar.pl
Dmitry Karasik <dk@plab.ku.dk>, Anton Berezin <tobez@plab.ku.dk> - documentation
|
Prima::ScrollBar - standard scroll bars class |