File: Gtk.pm

package info (click to toggle)
dbishell 0.8.9-7
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 828 kB
  • ctags: 1,423
  • sloc: perl: 13,353; makefile: 138; sh: 15
file content (63 lines) | stat: -rw-r--r-- 1,224 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package DBIShell::Gtk;

use strict;
use DBIShell;
use DBIShell::UTIL qw(TRUE FALSE);
use Exporter ();

use Gtk;
use Gtk::Atoms;
#use Gtk::Keybinding qw(:modifiers);

use DBIShell::Gtk::main;
use DBIShell::Gtk::conn;
#use DBIShell::Gtk::help;
#use DBIShell::Gtk::rbug;

use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION);

@ISA         = qw(DBIShell);
@EXPORT      = ();
@EXPORT_OK   = ();
%EXPORT_TAGS = ();
$VERSION     = 0.01_02;

sub new ($)
{
    my $sh;
    my $ext;
    my $idir;
    my $package = ref($_[0]) ? ref(shift(@_)) : $_[0];

#::    $idir = '<%SDIR%>';

    $idir ||= '.';
    $sh  = $package->_obj_struct();
    $ext = $sh->{GTK} =
    {
     CONTROL => undef(), # 'main' window
     DATA    => [],      # data display windows
     HELP    => [],      # help windows
     SHARE   => $idir,   # where is our equivalent of '/usr/share/dbishell'
    };

    return bless( $sh, $package );
}

sub _share ($) { return $_[0]->{GTK}{SHARE} }

sub start ($)
{
    my $sh = $_[0];

    # add a bit here to spawn a db-interaction panel if we have enough args to
    # connect.

    $sh->DBIShell::Gtk::main::panel();
}


__END__

	#print(STDERR "XPM ( ", $_->[TL_XPM], " ) >> ");
	#print(STDERR $icon, "\n");