![]() |
![]()
| ![]() |
![]()
NAME"Tickit::Widget::CheckButton" - a widget allowing a toggle true/false option SYNOPSISuse Tickit; use Tickit::Widget::CheckButton; use Tickit::Widget::VBox; my $vbox = Tickit::Widget::VBox->new; $vbox->add( Tickit::Widget::CheckButton->new( label => "Check button $_", ) ) for 1 .. 5; Tickit->new( root => $vbox )->run; DESCRIPTIONThis class provides a widget which allows a true/false selection. It displays a clickable indication of status and a caption. Clicking on the status or caption inverts the status of the widget. This widget is part of an experiment in evolving the design of the Tickit::Style widget integration code, and such is subject to change of details. STYLEThe default style pen is used as the widget pen. The following style pen prefixes are also used:
The following style keys are used:
The following style tags are used:
The following style actions are used:
CONSTRUCTORnew$checkbutton = Tickit::Widget::CheckButton->new( %args ); Constructs a new "Tickit::Widget::CheckButton" object. Takes the following named argmuents
ACCESSORSlabelset_label$label = $checkbutton->label; $checkbutton->set_label( $label ); Returns or sets the label text of the button. on_toggle$on_toggle = $checkbutton->on_toggle; set_on_toggle$checkbutton->set_on_toggle( $on_toggle ); Return or set the CODE reference to be called when the button state is changed. $on_toggle->( $checkbutton, $active ); METHODSactivate$checkbutton->activate; Sets this button's active state to true. deactivate$checkbutton->deactivate; Sets this button's active state to false. is_active$active = $checkbutton->is_active; Returns this button's active state. AUTHORPaul Evans <leonerd@leonerd.org.uk>
|