Snapper / Sources

#!/usr/local/bin/perl
#
# Generic startup script read into XML Compile
#
#################

use Getopt::Long;

print "snapper bootstrap starting...\n";
use Snapper;
print " loaded library Snapper\n";

my ($debug);

GetOptions(
"debug" => \$debug,
);
$Snapper::debug = defined($debug);

# create new object
$Main::xml = Snapper->new();
if ($Main::xml) {
print " new Snapper object created\n";
} else {
die " could not create Snapper object\n";
}
print " reading xml embedded data...\n";
$Main::xml_text = join('',<DATA>);
print " --> done.\n";
print " building GladeXML object...\n";
$Main::xml->build_memory($Main::xml_text,'/home/wks_bill/snapper-perl/contrib/pixmaps//');
print " --> done\n";
print " jumping in with source scripts...\n\n";
$Main::xml->source_scripts("MAIN");

__DATA__
<?xml version="1.0"?>
<GTK-Interface>
<core>
<module>
<class>System</class>
<name>system</name>
<caption></caption>
<gui></gui>
<module>
<class>Module</class>
<name>MAIN</name>
<caption></caption>
<gui></gui>
<widget>
<class>GtkWindow</class>
<name>login_screen</name>
<border_width>5</border_width>
<visible>False</visible>
<signal>
<name>destroy</name>
<handler>GtkPizza::gtk_main_quit</handler>
<last_modification_time>Wed, 31 Oct 2001 20:19:21 GMT</last_modification_time>
</signal>
<title>Login</title>
<type>GTK_WINDOW_TOPLEVEL</type>
<position>GTK_WIN_POS_NONE</position>
<modal>False</modal>
<allow_shrink>False</allow_shrink>
<allow_grow>False</allow_grow>
<auto_shrink>False</auto_shrink>
<widget>
<class>GtkVBox</class>
<name>vbox1</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<widget>
<class>GtkTable</class>
<name>table2</name>
<rows>2</rows>
<columns>1</columns>
<homogeneous>False</homogeneous>
<row_spacing>5</row_spacing>
<column_spacing>5</column_spacing>
<child>
<padding>5</padding>
<expand>False</expand>
<fill>False</fill>
</child>
<widget>
<class>GtkPixmap</class>
<name>pixmap1</name>
<filename>Pizza.xpm</filename>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<build_insensitive>True</build_insensitive>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>True</yfill>
</child>
</widget>
<widget>
<class>GtkTable</class>
<name>table3</name>
<rows>2</rows>
<columns>2</columns>
<homogeneous>False</homogeneous>
<row_spacing>0</row_spacing>
<column_spacing>0</column_spacing>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>1</top_attach>
<bottom_attach>2</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>True</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>False</xfill>
<yfill>False</yfill>
</child>
<widget>
<class>GtkEntry</class>
<name>login_user</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
<child>
<left_attach>1</left_attach>
<right_attach>2</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
--- CUT ---
...


Valid HTML 4.01!
Content owned by Albacore Technology is copyright 1999-2000 Albacore Technology, LLC All rights reserved.