File: canvas.pl

package info (click to toggle)
libgnome2-canvas-perl 1.002-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 320 kB
  • ctags: 76
  • sloc: perl: 1,601; makefile: 21; ansic: 13
file content (37 lines) | stat: -rw-r--r-- 1,088 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
use strict;
use Gnome2::Canvas;

require "canvas-arrowhead.pl";
require "canvas-curve.pl";
require "canvas-features.pl";
require "canvas-fifteen.pl";
require "canvas-primitives.pl";
require "canvas-rich-text.pl";

sub create_canvas {
	my $app = Gtk2::Window->new;

	$app->signal_connect (delete_event => sub { Gtk2->main_quit; 1 });

	my $notebook = Gtk2::Notebook->new;
	$notebook->show;

	$app->add ($notebook);

	$notebook->append_page (CanvasPrimitives::create (0), Gtk2::Label->new ("Primitives"));
    	$notebook->append_page (CanvasPrimitives::create (1), Gtk2::Label->new ("Antialias"));  
	$notebook->append_page (CanvasArrowhead::create (), Gtk2::Label->new ("Arrowhead"));
	$notebook->append_page (CanvasFifteen::create (), Gtk2::Label->new ("Fifteen"));
	$notebook->append_page (CanvasFeatures::create (), Gtk2::Label->new ("Features"));
	$notebook->append_page (CanvasRichText::create (), Gtk2::Label->new ("Rich Text"));
	$notebook->append_page (CanvasBezierCurve::create (), Gtk2::Label->new ("Bezier Curve"));

	$app->show;
}


Gtk2->init;

create_canvas ();

Gtk2->main;