2003-02-27 Charles Iliya Krempeaux <charles@reptile.ca>

* sample/rsvg : Created place to put sample program
	  that uses Rsvg#.
	* sample/Makefile.in : Edited it to make it "make"
	  the stuff in "sample/rsvg".
	* sample/rsvg/Makefile.in : Added it to "make" the
	  Rsvg# sample program.
	* sample/rsvg/svghelloworld.cs : Added it.  It's
	  the sample Rsvg# program.
	* sample/rsvg/sample.svg : Added it.  It's a
	  sample SVG file that the program displays.
	* configure.in : Modified it so it will create
	  sample/rsvg/Makefile from sample/rsvg/Makefile.in.

svn path=/trunk/gtk-sharp/; revision=12504
This commit is contained in:
Charles Iliya Krempeaux 2003-03-14 07:31:51 +00:00
parent a3d22ce2c2
commit 882425cc53
6 changed files with 2289 additions and 0 deletions

View file

@ -83,6 +83,21 @@
* sources/Gdk.metadata: Make Colormap.AllocColor GdkColor
parameter be a `ref' parameter.
2003-02-27 Charles Iliya Krempeaux <charles@reptile.ca>
* sample/rsvg : Created place to put sample program
that uses Rsvg#.
* sample/Makefile.in : Edited it to make it "make"
the stuff in "sample/rsvg".
* sample/rsvg/Makefile.in : Added it to "make" the
Rsvg# sample program.
* sample/rsvg/svghelloworld.cs : Added it. It's
the sample Rsvg# program.
* sample/rsvg/sample.cvs : Added it. It's a
sample SVG file that the program displays.
* configure.in : Modified it so it will create
sample/rsvg/Makefile from sample/rsvg/Makefile.in.
2003-02-27 Charles Iliya Krempeaux <charles@reptile.ca>
* sources/makefile : Updated the "make get-source-code"

View file

@ -129,6 +129,7 @@ gconf/tools/Makefile
gst/Makefile
rsvg/Makefile
sample/Makefile
sample/rsvg/Makefile
])
echo "---"

View file

@ -20,6 +20,7 @@ windows:
linux: gtk-hello-world.exe button.exe subclass.exe menu.exe size.exe scribble.exe treeviewdemo.exe $(GNOME_TARGETS) $(GLADE_TARGETS)
@ENABLE_GNOME_TRUE@ $(MAKE) -C gconf
@ENABLE_GNOME_TRUE@ $(MAKE) -C rsvg
gtk-hello-world.exe: HelloWorld.cs
$(MCS) --unsafe -o gtk-hello-world.exe $(local_paths) $(all_assemblies) HelloWorld.cs

10
sample/rsvg/Makefile.in Normal file
View file

@ -0,0 +1,10 @@
all:
@ENABLE_RSVG_TRUE@ mcs svghelloworld.cs \
@ENABLE_RSVG_TRUE@ -r ../../gnome/gnome-sharp.dll \
@ENABLE_RSVG_TRUE@ -r ../../gtk/gtk-sharp.dll \
@ENABLE_RSVG_TRUE@ -r ../../gdk/gdk-sharp.dll \
@ENABLE_RSVG_TRUE@ -r ../../rsvg/rsvg-sharp.dll \
clean:
rm -f *.exe

2211
sample/rsvg/sample.svg Normal file

File diff suppressed because it is too large Load diff

After

Width:  |  Height:  |  Size: 58 KiB

View file

@ -0,0 +1,51 @@
//
// samples/rsvg/svghelloworkd.cs
//
// Author: Charles Iliya Krempeaux
//
class SvgHelloWorld
{
static void Main(string[] args)
{
Gnome.Program program =
new Gnome.Program("Hello World", "1.0", Gnome.Modules.UI, args);
MyMainWindow app = new MyMainWindow(program);
app.Show();
program.Run();
}
}
class MyMainWindow
: Gnome.App
{
Gnome.Program program;
public MyMainWindow(Gnome.Program gnome_program)
: base("SVG Hello World", "SVG Hello World")
{
this.program = gnome_program;
this.DeleteEvent += new GtkSharp.DeleteEventHandler(delete_event);
string svg_file_name = "sample.svg";
Gdk.Pixbuf pixbuf = Rsvg.Tool.PixbufFromFile(svg_file_name);
Gtk.Image image = new Gtk.Image();
image.Pixbuf = pixbuf;
this.Contents = image;
}
private void delete_event(object obj, GtkSharp.DeleteEventArgs args)
{
this.program.Quit();
}
}