NAME
BBS::Perm::Term - a multi terminals component based on Vte
VERSION
This document describes BBS::Perm::Term version 0.0.1
SYNOPSIS
use BBS::Perm::Term;
my $term = BBS::Perm::Term->new( widget => Gtk2::HBox->new );
DESCRIPTION
BBS::Perm::Term is a Gnome's Vte based terminal, mainly for BBS::Perm. In fact, it's a transperant wrapper to Gnome2::Vte.
INTERFACE
- new( %option )
-
create a new BBS::Perm::Term object. %option could have these keys:
- widget => $container_widget
-
$container_widget is a Gtk2::HBox or Gtk2::VBox object, which will be the container of our terminals.
- agent => $agent_command
-
designate where is your agent script, default is 'bbs-perm-agent'.
$agent_command will be called as "$agent_command $file $sitename", where $file and $sitename have the same meanings as BBS::Perm::Config's, so your script can get enough information given 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.
- 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.
DEPENDENCIES
INCOMPATIBILITIES
None reported.
BUGS AND LIMITATIONS
You can't set colors for Gnome2::Vte::Terminal object right now, at least this doesn't work to me. Anyway, hey, the default color scheme is pretty enough, isn't?
AUTHOR
sunnavy <sunnavy@gmail.com>
LICENCE AND COPYRIGHT
Copyright (c) 2007, sunnavy <sunnavy@gmail.com>
. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.