App-MatrixClient
view release on metacpan or search on metacpan
lib/App/MatrixClient.pm view on Meta::CPAN
name => $room->room_id,
make_widget => sub {
my ( $scroller ) = @_;
my $vbox = Tickit::Widget::VBox->new;
$vbox->add( $headline = Tickit::Widget::Static->new(
text => "",
style => { bg => "blue" },
),
expand => 0
);
$vbox->add( $scroller, expand => 1 );
return $floatbox = Tickit::Widget::FloatBox->new(
base_child => $vbox,
);
},
on_line => sub {
my ( $tab, $line ) = @_;
if( $line =~ s{^/}{} ) {
my ( $cmd, @args ) = split m/\s+/, $line;
if( my $code = $tab->can( "cmd_$cmd" ) ) {
lib/App/MatrixClient/RoomTab.pm view on Meta::CPAN
# Create an abstract widget tree during initial loading to avoid the
# O(n^2) overhead of resizing the gridbox after -every- user is added.
my $vbox = Tickit::Widget::VBox->new;
$vbox->add(
Tickit::Widget::ScrollBox->new(
child => $presence_table,
vertical => "on_demand",
horizontal => 0,
),
expand => 1,
);
$vbox->add(
my $presence_summary = Tickit::Widget::Static->new( text => "" )
);
my $presence_float;
my $visible = 0;
$self->bind_key( 'F2' => sub {
$visible ? ( $presence_float->hide, $visible = 0 )
( run in 0.488 second using v1.01-cache-2.11-cpan-5b529ec07f3 )