|
NAME"Tickit::WidgetRole::Alignable" - implement widgets with adjustable alignmentDESCRIPTIONMixing this parametric role into a Tickit::Widget subclass adds behaviour to implement alignment of content within a possibly-larger space.METHODSThe following methods are provided parametrically on the caller package when the module is imported byuse Tickit::WidgetRole::Alignable name => NAME, style => STYLE, reshape => RESHAPE; The parameters are
NAME$align = $widget->NAME Return the current alignment value set_NAME$widget->set_NAME( $value ) Set the new alignment value Gives a value in the range from 0.0 to 1.0 to align the content display within the window. For vertical direction alignments, the symbolic values "top", "middle" and "bottom" can be supplied instead of 0.0, 0.5 and 1.0 respectively. For horizontal direction alignments, the symbolic values "left", "centre" and "right" can be supplied instead of 0.0, 0.5 and 1.0 respectively. _NAME_allocation( $before, $alloc, $after ) = $widget->_NAME_allocation( $value, $total ) Returns a list of three integers created by aligning the $value to the given alignment position within the $total. See also "align" in Tickit::Utils. AUTHORPaul Evans <leonerd@leonerd.org.uk>
Visit the GSP FreeBSD Man Page Interface. |