20 Nov 2021 15:27:07 UTC
- Distribution: Tickit-Widget-FloatBox
- Module version: 0.10
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (0)
- Testers (21 / 1 / 38)
- KwaliteeBus factor: 1
- % Coverage
- License: perl_5
- Perl: v5.26.0
- Download (15.59KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
Tickit::Widget::FloatBox- manage a collection of floating widgets
This container widget maintains a collection of floating widgets that can be displayed over the top of a single base widget. The box itself is entirely occupied by the base widget, and by default when no floats are created or displayed it will behave essentially invisibly, as though the box were not there and the base widget was an immediate child of the container the floatbox is inside.
$floatbox = Tickit::Widget::FloatBox->new( %args )
Constructs a new
Takes the following named arguments in addition to those taken by the base Tickit::ContainerWidget constructor.
- base_child => Tickit::Widget
The main Tickit::Widget instance to use as the base.
This argument is now discouraged as it complicates the construction of subclasses; see instead the "set_base_child" method used as a chaining mutator.
$base_child = $floatbox->base_child $floatbox->set_base_child( $base_child )
Returns or sets the base widget to use.
The mutator method returns the container widget instance itself making it suitable to use as a chaining mutator; e.g.
my $container = Tickit::Widget::FloatBox->new( ... ) ->set_base_child( Tickit::Widget::Box->new ... );
$float = $floatbox->add_float( %args )
Adds a widget as a floating child and returns a new
Floatobject. Takes the following arguments:
- child => Tickit::Widget
The child widget
The initial geometry of the floating area. These follow the same behaviour as the
movemethod on the Float object.
- hidden => BOOL
Optional. If true, the float starts off hidden initally, and must be shown by the
showmethod before it becomes visible.
The following objects represent a floating region as returned by the
$child = $float->child
Returns the child widget in the region.
$float->move( %args )
Redefines the area geometry of the region. Takes arguments named
right, each of which should either be a numeric value, or
The region must have at least one of
bottomand at least one of
rightdefined, which will then fix the position of one corner of the region. If the size is not otherwise determined by the geometry, it will use the preferred size of the child widget. Any geometry argument may be negative to count backwards from the limits of the parent.
# top-left corner $float->move( top => 0, left => 0 ) # top-right corner $float->move( top => 0, right => -1 ) # bottom 3 lines, flush left $float->move( left => 0, top => -3, bottom => -1 )
Any arguments not passed will be left unchanged; to specifically clear the current value pass a value of
Removes the float from the FloatBox.
Hide the float by hiding the window of its child widget.
Show the float by showing the window of its child widget. Undoes the effect of
$visible = $float->is_visible
Return true if the float is currently visible.
Support adjusting stacking order of floats.
Paul Evans <email@example.com>
Module Install Instructions
To install Tickit::Widget::FloatBox, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Tickit::Widget::FloatBox
For more information on module installation, please visit the detailed CPAN module installation guide.
|s||Focus search bar|
|?||Bring up this help dialog|
|g p||Go to pull requests|
|g i||go to github issues (only if github is preferred repository)|
|g a||Go to author|
|g c||Go to changes|
|g i||Go to issues|
|g d||Go to dist|
|g r||Go to repository/SCM|
|g s||Go to source|
|g b||Go to file browse|