NAME
BBS::Perm::Term - a multi-terminals component based on Vte for BBS::Perm
SYNOPSIS
use BBS::Perm::Term;
my $term = BBS::Perm::Term->new;
DESCRIPTION
BBS::Perm::Term is a Gnome2::Vte based terminal, mainly for BBS::Perm. In fact, it's a transperant wrapper to Gnome2::Vte.
INTERFACE
- new( agent => $agent, widget => $widget )
-
create a new BBS::Perm::Term object.
$widget is a Gtk2::HBox or Gtk2::VBox object, which will be the container of our terminals, default is a new Gtk2::HBox object.
$agent designate our agent script, default is 'bbs-perm-agent'.
$agent will be called as "$agent $file $sitename", where $file and $sitename have the same meanings as BBS::Perm::Config's, so our script can get enough information by these two arguments.
- term
-
return the current terminal, which is a Gnome2::Vte::Terminal object, so you can do anything a Gnome2::Vte::Terminal object can do, ;-)
- init( $conf )
-
initiate the terminal to be our `current' terminal. $conf is the same as the return value of BBS::Perm::Config object's setting method.
- connect
-
let the current terminal connect to the BBS server.
- switch( $direction )
-
our object could have many Gnome2::Vte::Terminal objects, this method help us switch among them, choosing some as the current terminal. -1 for left, 1 for right.
- title
-
get current terminal's title.
- encoding
-
get current terminal's encoding.
- text
-
get current terminal's text. ( just plain text, not a colorful one, ;-)
- clean
-
when an agent script exited, this method will be call, for cleaning, of cause.
AUTHOR
sunnavy <sunnavy@gmail.com>
LICENCE AND COPYRIGHT
Copyright (c) 2007-2011, sunnavy <sunnavy@gmail.com>
.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.