1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation; either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * gtkD is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with gtkD; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
17  */
18 
19 module TestText;
20 
21 private import gtk.VBox;
22 
23 private import gtk.ScrolledWindow;
24 private import gtk.TextView;
25 private import gtk.TextBuffer;
26 
27 /**
28  * This tests the GtkD text widget
29  */
30 
31 class TestText : VBox
32 {
33 
34 	private import gtk.ScrolledWindow;
35 
36 	this()
37 	{
38 
39 		super(false,0);
40 
41 		debug(1)
42 		{
43 			printf("instantiating TestText\n");
44 		}
45 
46 		ScrolledWindow sw = new ScrolledWindow(null, null);
47 		sw.setPolicy(PolicyType.AUTOMATIC,PolicyType.AUTOMATIC);
48 
49 		TextView textView = new TextView();
50 		TextBuffer textBuffer = textView.getBuffer();
51 		textBuffer.setText(
52 
53 "\nGktD preview 8"
54 "\n"
55 "\nIntroduction"
56 "\nGtkD is a D language graphical user interface based on GKT+ graphical toolkit"
57 "\nGtkD stands for D graphical User Interface"
58 "\nGtkD is in a very early state of development and should be considered in alpha state."
59 "\nGtkD is released under the GPL license"
60 "\nTo discuss about GtkD:"
61 "\n"
62 "\n    * if it's D related or can have interest to other D user please use the D discussion group at"
63 "\n      Digital Mars D news group"
64 "\n    * if it's a GtkD issue with no insterest to other D user please use the GtkD Dsource forum"
65 "\n      on Dsource.org"
66 "\n"
67 "\nObjectives"
68 "\nThe main goal of GtkD is to enable the creation of D GUI applications under Linux."
69 "\nGtkD should be simple and straightforward to use."
70 "\nD can interface with C so any graphics toolkit with a C API can be used directly from D, this include GTK+."
71 "\nDownload and Status"
72 "\nfor now GtkD can display most of the GTK+ widgets and respond to the common user actions"
73 "\nGtkD is still of little use but you can get it on the Download and Status."
74 "\nUsage"
75 "\nSee the Screen shots and Usage for screenshots and details on how to use GtkD."
76 "\nHere is a simple GtkD program:"
77 
78 		);
79 
80 		sw.add(textView);
81 		packStart(sw,true,true,0);
82 
83 	}
84 
85 }