Permalink
Browse files

Something new

  • Loading branch information...
1 parent 6563ad6 commit f3c9c736c3c6ecce723538e13fd563b74e76e96c @cannonerd committed Feb 19, 2012
View
@@ -0,0 +1,37 @@
+#!/usr/bin/gjs
+Gtk = imports.gi.Gtk;
+//Import stuff needed by your Example here
+
+
+/*-------------------------------------------*/
+Gtk.init(null, 0);
+//Initialize stuff imported and needed by your example Here
+
+
+/*-------------------------------------------*/
+myW = new Gtk.Window({type: Gtk.WindowType.TOPLEVEL});
+myW.title = "TestForm";
+myW.connect("destroy", function(){Gtk.main_quit()});
+grid = new Gtk.Grid();
+myW.add(grid);
+//plase Example Here:
+
+var entry = new Gtk.Entry({text: "Write something here"});
+entry.set_width_chars(50);
+var label = new Gtk.Label({label: "This is an etry widget: "});
+var connectionbutton = new Gtk.Button({label: "It's contents are connected to the label after this button"});
+this.resultlabel = new Gtk.Label({
+ label: "The contents of the entry will be here after you click the button"
+});
+connectionbutton.connect("clicked", function(widget, event) {
+ var whatWasTyped = entry.get_text();
+ this.resultlabel.set_text(whatWasTyped);
+});
+
+grid.attach(label, 1, 1, 1, 1);
+grid.attach_next_to(entry,label,1,1,1);
+grid.attach_next_to(connectionbutton,label,3,1,1);
+grid.attach_next_to(resultlabel,entry,3,1,1);
+/*-------------------------------------------*/
+myW.show_all();
+Gtk.main();
No changes.
View
@@ -0,0 +1,37 @@
+#!/usr/bin/gjs
+Gtk = imports.gi.Gtk;
+//Import stuff needed by your Example here
+
+
+/*-------------------------------------------*/
+Gtk.init(null, 0);
+//Initialize stuff imported and needed by your example Here
+
+
+/*-------------------------------------------*/
+myW = new Gtk.Window({type: Gtk.WindowType.TOPLEVEL});
+myW.title = "TestForm";
+myW.connect("destroy", function(){Gtk.main_quit()});
+grid = new Gtk.Grid();
+myW.add(grid);
+//plase Example Here:
+
+var entry = new Gtk.Entry({text: "Write something here"});
+entry.set_width_chars(100);
+var label = new Gtk.Label({label: "This is an etry widget: "});
+var connectionbutton = new Gtk.Button({label: "It's contents are connected to the label after this button"});
+this.resultlabel = new Gtk.Label({
+ label: "The contents of the entry will be here after you click the button"
+});
+connectionbutton.connect("clicked", function(widget, event) {
+ var whatWasTyped = entry.get_text();
+ this.resultlabel.set_text(whatWasTyped);
+});
+
+grid.attach(label, 1, 1, 1, 1);
+grid.attach_next_to(entry,label,1,1,1);
+grid.attach_next_to(connectionbutton,label,3,1,1);
+grid.attach_next_to(resultlabel,entry,3,1,1);
+/*-------------------------------------------*/
+myW.show_all();
+Gtk.main();
View
@@ -0,0 +1,23 @@
+#!/usr/bin/gjs
+Gtk = imports.gi.Gtk;
+//Import stuff needed by your Example here
+
+
+/*-------------------------------------------*/
+Gtk.init(null, 0);
+//Initialize stuff imported and needed by your example Here
+
+
+/*-------------------------------------------*/
+myW = new Gtk.Window({type: Gtk.WindowType.TOPLEVEL});
+myW.title = "TestForm";
+myW.connect("destroy", function(){Gtk.main_quit()});
+var grid = new Gtk.Grid();
+myW.add(grid);
+//plase Example Here:
+
+
+grid.add(/*example thing*/);
+/*-------------------------------------------*/
+myW.show_all();
+Gtk.main();
View
@@ -0,0 +1,20 @@
+#!/usr/bin/gjs
+Gtk = imports.gi.Gtk;
+//Import stuff needed by your Example here
+
+/*-------------------------------------------*/
+Gtk.init(null, 0);
+//Initialize stuff imported and needed by your example Here
+
+/*-------------------------------------------*/
+myW = new Gtk.Window({type: Gtk.WindowType.TOPLEVEL});
+myW.title = "TestForm";
+myW.connect("destroy", function(){Gtk.main_quit()});
+var grid = new Gtk.Grid();
+myW.add(grid);
+//plase Example Here:
+
+grid.add(/*example thing*/);
+/*-------------------------------------------*/
+myW.show_all();
+Gtk.main();
No changes.

0 comments on commit f3c9c73

Please sign in to comment.