visualruby 1.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/bin/editor/VR_Document.rb +219 -0
- data/bin/editor/VR_TabSearch.rb +50 -0
- data/bin/editor/VR_Tabs.rb +99 -0
- data/bin/editor/VR_TextShell.rb +83 -0
- data/bin/editor/VR_TextViewCommon.rb +65 -0
- data/bin/editor/glade/VR_Document.glade +160 -0
- data/bin/main/GemTree.rb +23 -0
- data/bin/main/NewProjectGUI.rb +28 -0
- data/bin/main/ProjectChooserGUI.rb +41 -0
- data/bin/main/ProjectChooserView.rb +39 -0
- data/bin/main/RubygemsAPI.rb +93 -0
- data/bin/main/Splash.rb +22 -0
- data/bin/main/VR_ENV.rb +61 -0
- data/bin/main/VR_ENV_GLOBAL.rb +64 -0
- data/bin/main/VR_File_Tree.rb +120 -0
- data/bin/main/VR_Local_Gem_Tree.rb +80 -0
- data/bin/main/VR_Main.rb +313 -0
- data/bin/main/VR_Remote_Gem_Tree.rb +70 -0
- data/bin/main/glade/NewProjectGUI.glade +141 -0
- data/bin/main/glade/ProjectChooserGUI.glade +140 -0
- data/bin/main/glade/RubygemsAPI.glade +130 -0
- data/bin/main/glade/Splash.glade +18 -0
- data/bin/main/glade/VR_ENV.glade +168 -0
- data/bin/main/glade/VR_ENV_GLOBAL.glade +268 -0
- data/bin/main/glade/VR_File_Tree.glade +65 -0
- data/bin/main/glade/VR_Local_Gem_Tree.glade +45 -0
- data/bin/main/glade/VR_Main.glade +707 -0
- data/bin/main/glade/VR_Remote_Gem_Tree.glade +76 -0
- data/bin/tools/VR_Tools.rb +120 -0
- data/img/close.png +0 -0
- data/img/folder.png +0 -0
- data/img/glade.png +0 -0
- data/img/gtk-edit.png +0 -0
- data/img/obj.png +0 -0
- data/img/png.png +0 -0
- data/img/rb.png +0 -0
- data/img/ruby.png +0 -0
- data/img/splash.png +0 -0
- data/img/unknown.png +0 -0
- data/skeleton/document/New.glade +13 -0
- data/skeleton/document/NewWindow.rb +15 -0
- data/skeleton/project/bin/MyClass.rb +15 -0
- data/skeleton/project/bin/glade/MyClass.glade +45 -0
- data/skeleton/project/main.rb +14 -0
- data/visualruby_examples/active_record/.vr_settings.yaml +47 -0
- data/visualruby_examples/active_record/active_record.rb +52 -0
- data/visualruby_examples/active_record/bin/ChoosePerson.rb +17 -0
- data/visualruby_examples/active_record/bin/Person.rb +13 -0
- data/visualruby_examples/active_record/bin/glade/ChoosePerson.glade +61 -0
- data/visualruby_examples/active_record/bin/glade/Person.glade +148 -0
- data/visualruby_examples/active_record/db/development.sqlite3 +0 -0
- data/visualruby_examples/active_record2/.vr_settings.yaml +48 -0
- data/visualruby_examples/active_record2/active_record2.rb +142 -0
- data/visualruby_examples/active_record2/bin/CompanyGUI.rb +54 -0
- data/visualruby_examples/active_record2/bin/Employee.rb +20 -0
- data/visualruby_examples/active_record2/bin/Employer.rb +11 -0
- data/visualruby_examples/active_record2/bin/Paycheck.rb +11 -0
- data/visualruby_examples/active_record2/bin/glade/CompanyGUI.glade +167 -0
- data/visualruby_examples/active_record2/bin/glade/Employee.glade +123 -0
- data/visualruby_examples/active_record2/bin/glade/Employer.glade +147 -0
- data/visualruby_examples/active_record2/bin/glade/Paycheck.glade +145 -0
- data/visualruby_examples/active_record2/db/development.sqlite3 +0 -0
- data/visualruby_examples/all_widgets/.vr_settings.yaml +20 -0
- data/visualruby_examples/all_widgets/all_widgets.rb +13 -0
- data/visualruby_examples/all_widgets/bin/AllWidgets.rb +43 -0
- data/visualruby_examples/all_widgets/bin/glade/AllWidgets.glade +166 -0
- data/visualruby_examples/all_widgets/bin/splash.png +0 -0
- data/visualruby_examples/calculator/.vr_settings.yaml +21 -0
- data/visualruby_examples/calculator/bin/Calculator.rb +63 -0
- data/visualruby_examples/calculator/bin/glade/Calculator.glade +243 -0
- data/visualruby_examples/calculator/main.rb +13 -0
- data/visualruby_examples/child_window/.vr_settings.yaml +46 -0
- data/visualruby_examples/child_window/bin/ChildWindowDemo.rb +41 -0
- data/visualruby_examples/child_window/bin/MyChildClass.rb +42 -0
- data/visualruby_examples/child_window/bin/glade/ChildWindowDemo.glade +101 -0
- data/visualruby_examples/child_window/bin/glade/MyChildClass.glade +58 -0
- data/visualruby_examples/child_window/main.rb +13 -0
- data/visualruby_examples/drag_drop/.vr_settings.yaml +19 -0
- data/visualruby_examples/drag_drop/bin/DragDropDemo.rb +45 -0
- data/visualruby_examples/drag_drop/bin/glade/DragDropDemo.glade +143 -0
- data/visualruby_examples/drag_drop/img/folder.png +0 -0
- data/visualruby_examples/drag_drop/img/glade.png +0 -0
- data/visualruby_examples/drag_drop/img/gtk-edit.png +0 -0
- data/visualruby_examples/drag_drop/img/obj.png +0 -0
- data/visualruby_examples/drag_drop/img/png.png +0 -0
- data/visualruby_examples/drag_drop/img/rb.png +0 -0
- data/visualruby_examples/drag_drop/img/ruby.png +0 -0
- data/visualruby_examples/drag_drop/img/unknown.png +0 -0
- data/visualruby_examples/drag_drop/main.rb +14 -0
- data/visualruby_examples/listview/.vr_settings.yaml +46 -0
- data/visualruby_examples/listview/bin/SongListView.rb +89 -0
- data/visualruby_examples/listview/bin/SongListViewGUI.rb +67 -0
- data/visualruby_examples/listview/bin/audio-x-generic.png +0 -0
- data/visualruby_examples/listview/bin/glade/SongListViewGUI.glade +220 -0
- data/visualruby_examples/listview/main.rb +19 -0
- data/visualruby_examples/listview_objects/.vr_settings.yaml +46 -0
- data/visualruby_examples/listview_objects/bin/DataObject.rb +32 -0
- data/visualruby_examples/listview_objects/bin/DataObjectGUI.rb +41 -0
- data/visualruby_examples/listview_objects/bin/ListViewObjects.rb +34 -0
- data/visualruby_examples/listview_objects/bin/ListViewObjectsGUI.rb +18 -0
- data/visualruby_examples/listview_objects/bin/glade/DataObject.glade +198 -0
- data/visualruby_examples/listview_objects/bin/glade/ListViewObjectsGUI.glade +102 -0
- data/visualruby_examples/listview_objects/main.rb +13 -0
- data/visualruby_examples/simple_ruby_gui/.vr_settings.yaml +45 -0
- data/visualruby_examples/simple_ruby_gui/bin/DataObjectGUI.rb +20 -0
- data/visualruby_examples/simple_ruby_gui/bin/glade/DataObjectGUI.glade +163 -0
- data/visualruby_examples/simple_ruby_gui/simple_ruby_gui +16 -0
- data/visualruby_examples/treeview/.vr_settings.yaml +18 -0
- data/visualruby_examples/treeview/bin/MyClass.rb +28 -0
- data/visualruby_examples/treeview/bin/glade/MyClass.glade +48 -0
- data/visualruby_examples/treeview/main.rb +14 -0
- data/vr +40 -0
- metadata +202 -0
@@ -0,0 +1,123 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<interface>
|
3
|
+
<requires lib="gtk+" version="2.16"/>
|
4
|
+
<!-- interface-naming-policy project-wide -->
|
5
|
+
<object class="GtkWindow" id="window1">
|
6
|
+
<property name="width_request">450</property>
|
7
|
+
<property name="height_request">230</property>
|
8
|
+
<property name="visible">True</property>
|
9
|
+
<property name="title" translatable="yes">Employee Info</property>
|
10
|
+
<property name="modal">True</property>
|
11
|
+
<signal name="destroy" handler="destroy_window"/>
|
12
|
+
<child>
|
13
|
+
<object class="GtkHBox" id="hbox1">
|
14
|
+
<property name="visible">True</property>
|
15
|
+
<child>
|
16
|
+
<object class="GtkVBox" id="vbox1">
|
17
|
+
<property name="width_request">450</property>
|
18
|
+
<property name="visible">True</property>
|
19
|
+
<child>
|
20
|
+
<object class="GtkLabel" id="label5">
|
21
|
+
<property name="visible">True</property>
|
22
|
+
<property name="yalign">0.4699999988079071</property>
|
23
|
+
<property name="label" translatable="yes"><big><big>Edit Employee</big></big></property>
|
24
|
+
<property name="use_markup">True</property>
|
25
|
+
</object>
|
26
|
+
<packing>
|
27
|
+
<property name="padding">15</property>
|
28
|
+
<property name="position">0</property>
|
29
|
+
</packing>
|
30
|
+
</child>
|
31
|
+
<child>
|
32
|
+
<object class="GtkTable" id="table1">
|
33
|
+
<property name="visible">True</property>
|
34
|
+
<property name="n_rows">2</property>
|
35
|
+
<property name="n_columns">2</property>
|
36
|
+
<property name="column_spacing">5</property>
|
37
|
+
<property name="row_spacing">5</property>
|
38
|
+
<child>
|
39
|
+
<object class="GtkLabel" id="label1">
|
40
|
+
<property name="visible">True</property>
|
41
|
+
<property name="xalign">1</property>
|
42
|
+
<property name="label" translatable="yes">Name:</property>
|
43
|
+
</object>
|
44
|
+
<packing>
|
45
|
+
<property name="x_options">GTK_FILL</property>
|
46
|
+
</packing>
|
47
|
+
</child>
|
48
|
+
<child>
|
49
|
+
<object class="GtkLabel" id="label2">
|
50
|
+
<property name="visible">True</property>
|
51
|
+
<property name="xalign">1</property>
|
52
|
+
<property name="label" translatable="yes">Address:</property>
|
53
|
+
</object>
|
54
|
+
<packing>
|
55
|
+
<property name="top_attach">1</property>
|
56
|
+
<property name="bottom_attach">2</property>
|
57
|
+
<property name="x_options">GTK_FILL</property>
|
58
|
+
</packing>
|
59
|
+
</child>
|
60
|
+
<child>
|
61
|
+
<object class="GtkEntry" id="Employee.name">
|
62
|
+
<property name="visible">True</property>
|
63
|
+
<property name="can_focus">True</property>
|
64
|
+
<property name="invisible_char">•</property>
|
65
|
+
</object>
|
66
|
+
<packing>
|
67
|
+
<property name="left_attach">1</property>
|
68
|
+
<property name="right_attach">2</property>
|
69
|
+
</packing>
|
70
|
+
</child>
|
71
|
+
<child>
|
72
|
+
<object class="GtkEntry" id="Employee.address">
|
73
|
+
<property name="visible">True</property>
|
74
|
+
<property name="can_focus">True</property>
|
75
|
+
<property name="invisible_char">•</property>
|
76
|
+
</object>
|
77
|
+
<packing>
|
78
|
+
<property name="left_attach">1</property>
|
79
|
+
<property name="right_attach">2</property>
|
80
|
+
<property name="top_attach">1</property>
|
81
|
+
<property name="bottom_attach">2</property>
|
82
|
+
</packing>
|
83
|
+
</child>
|
84
|
+
</object>
|
85
|
+
<packing>
|
86
|
+
<property name="position">1</property>
|
87
|
+
</packing>
|
88
|
+
</child>
|
89
|
+
<child>
|
90
|
+
<object class="GtkHButtonBox" id="hbuttonbox1">
|
91
|
+
<property name="visible">True</property>
|
92
|
+
<property name="spacing">10</property>
|
93
|
+
<property name="layout_style">end</property>
|
94
|
+
<child>
|
95
|
+
<object class="GtkButton" id="button1">
|
96
|
+
<property name="label" translatable="yes">Done</property>
|
97
|
+
<property name="visible">True</property>
|
98
|
+
<property name="can_focus">True</property>
|
99
|
+
<property name="receives_default">True</property>
|
100
|
+
<signal name="clicked" handler="destroy_window"/>
|
101
|
+
</object>
|
102
|
+
<packing>
|
103
|
+
<property name="expand">False</property>
|
104
|
+
<property name="fill">False</property>
|
105
|
+
<property name="position">0</property>
|
106
|
+
</packing>
|
107
|
+
</child>
|
108
|
+
</object>
|
109
|
+
<packing>
|
110
|
+
<property name="padding">25</property>
|
111
|
+
<property name="position">2</property>
|
112
|
+
</packing>
|
113
|
+
</child>
|
114
|
+
</object>
|
115
|
+
<packing>
|
116
|
+
<property name="padding">20</property>
|
117
|
+
<property name="position">0</property>
|
118
|
+
</packing>
|
119
|
+
</child>
|
120
|
+
</object>
|
121
|
+
</child>
|
122
|
+
</object>
|
123
|
+
</interface>
|
@@ -0,0 +1,147 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<interface>
|
3
|
+
<requires lib="gtk+" version="2.16"/>
|
4
|
+
<!-- interface-naming-policy project-wide -->
|
5
|
+
<object class="GtkWindow" id="window1">
|
6
|
+
<property name="visible">True</property>
|
7
|
+
<property name="title" translatable="yes">Employer Info</property>
|
8
|
+
<property name="modal">True</property>
|
9
|
+
<signal name="destroy" handler="destroy_window"/>
|
10
|
+
<child>
|
11
|
+
<object class="GtkHBox" id="hbox1">
|
12
|
+
<property name="visible">True</property>
|
13
|
+
<child>
|
14
|
+
<object class="GtkVBox" id="vbox1">
|
15
|
+
<property name="width_request">409</property>
|
16
|
+
<property name="visible">True</property>
|
17
|
+
<child>
|
18
|
+
<object class="GtkLabel" id="label1">
|
19
|
+
<property name="visible">True</property>
|
20
|
+
<property name="label" translatable="yes"><big><big>Edit Employer</big></big></property>
|
21
|
+
<property name="use_markup">True</property>
|
22
|
+
</object>
|
23
|
+
<packing>
|
24
|
+
<property name="padding">15</property>
|
25
|
+
<property name="position">0</property>
|
26
|
+
</packing>
|
27
|
+
</child>
|
28
|
+
<child>
|
29
|
+
<object class="GtkTable" id="table1">
|
30
|
+
<property name="visible">True</property>
|
31
|
+
<property name="n_rows">3</property>
|
32
|
+
<property name="n_columns">2</property>
|
33
|
+
<property name="column_spacing">10</property>
|
34
|
+
<property name="row_spacing">10</property>
|
35
|
+
<child>
|
36
|
+
<object class="GtkEntry" id="Employer.name">
|
37
|
+
<property name="visible">True</property>
|
38
|
+
<property name="can_focus">True</property>
|
39
|
+
<property name="invisible_char">•</property>
|
40
|
+
</object>
|
41
|
+
<packing>
|
42
|
+
<property name="left_attach">1</property>
|
43
|
+
<property name="right_attach">2</property>
|
44
|
+
</packing>
|
45
|
+
</child>
|
46
|
+
<child>
|
47
|
+
<object class="GtkEntry" id="address">
|
48
|
+
<property name="visible">True</property>
|
49
|
+
<property name="can_focus">True</property>
|
50
|
+
<property name="invisible_char">•</property>
|
51
|
+
</object>
|
52
|
+
<packing>
|
53
|
+
<property name="left_attach">1</property>
|
54
|
+
<property name="right_attach">2</property>
|
55
|
+
<property name="top_attach">1</property>
|
56
|
+
<property name="bottom_attach">2</property>
|
57
|
+
</packing>
|
58
|
+
</child>
|
59
|
+
<child>
|
60
|
+
<object class="GtkEntry" id="company_type">
|
61
|
+
<property name="visible">True</property>
|
62
|
+
<property name="can_focus">True</property>
|
63
|
+
<property name="invisible_char">•</property>
|
64
|
+
</object>
|
65
|
+
<packing>
|
66
|
+
<property name="left_attach">1</property>
|
67
|
+
<property name="right_attach">2</property>
|
68
|
+
<property name="top_attach">2</property>
|
69
|
+
<property name="bottom_attach">3</property>
|
70
|
+
</packing>
|
71
|
+
</child>
|
72
|
+
<child>
|
73
|
+
<object class="GtkLabel" id="label2">
|
74
|
+
<property name="visible">True</property>
|
75
|
+
<property name="xalign">1</property>
|
76
|
+
<property name="label" translatable="yes">Company Name:</property>
|
77
|
+
</object>
|
78
|
+
<packing>
|
79
|
+
<property name="x_options">GTK_FILL</property>
|
80
|
+
</packing>
|
81
|
+
</child>
|
82
|
+
<child>
|
83
|
+
<object class="GtkLabel" id="label3">
|
84
|
+
<property name="visible">True</property>
|
85
|
+
<property name="xalign">1</property>
|
86
|
+
<property name="label" translatable="yes">Address:</property>
|
87
|
+
</object>
|
88
|
+
<packing>
|
89
|
+
<property name="top_attach">1</property>
|
90
|
+
<property name="bottom_attach">2</property>
|
91
|
+
<property name="x_options">GTK_FILL</property>
|
92
|
+
</packing>
|
93
|
+
</child>
|
94
|
+
<child>
|
95
|
+
<object class="GtkLabel" id="label4">
|
96
|
+
<property name="visible">True</property>
|
97
|
+
<property name="xalign">1</property>
|
98
|
+
<property name="label" translatable="yes">Company Type:</property>
|
99
|
+
</object>
|
100
|
+
<packing>
|
101
|
+
<property name="top_attach">2</property>
|
102
|
+
<property name="bottom_attach">3</property>
|
103
|
+
<property name="x_options">GTK_FILL</property>
|
104
|
+
</packing>
|
105
|
+
</child>
|
106
|
+
</object>
|
107
|
+
<packing>
|
108
|
+
<property name="padding">5</property>
|
109
|
+
<property name="position">1</property>
|
110
|
+
</packing>
|
111
|
+
</child>
|
112
|
+
<child>
|
113
|
+
<object class="GtkHButtonBox" id="hbuttonbox1">
|
114
|
+
<property name="visible">True</property>
|
115
|
+
<property name="spacing">20</property>
|
116
|
+
<property name="layout_style">end</property>
|
117
|
+
<child>
|
118
|
+
<object class="GtkButton" id="buttonCancel">
|
119
|
+
<property name="label" translatable="yes">Cancel</property>
|
120
|
+
<property name="visible">True</property>
|
121
|
+
<property name="can_focus">True</property>
|
122
|
+
<property name="receives_default">True</property>
|
123
|
+
<signal name="clicked" handler="destroy_window"/>
|
124
|
+
</object>
|
125
|
+
<packing>
|
126
|
+
<property name="expand">False</property>
|
127
|
+
<property name="fill">False</property>
|
128
|
+
<property name="position">0</property>
|
129
|
+
</packing>
|
130
|
+
</child>
|
131
|
+
</object>
|
132
|
+
<packing>
|
133
|
+
<property name="expand">False</property>
|
134
|
+
<property name="padding">13</property>
|
135
|
+
<property name="position">2</property>
|
136
|
+
</packing>
|
137
|
+
</child>
|
138
|
+
</object>
|
139
|
+
<packing>
|
140
|
+
<property name="padding">20</property>
|
141
|
+
<property name="position">0</property>
|
142
|
+
</packing>
|
143
|
+
</child>
|
144
|
+
</object>
|
145
|
+
</child>
|
146
|
+
</object>
|
147
|
+
</interface>
|
@@ -0,0 +1,145 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<interface>
|
3
|
+
<requires lib="gtk+" version="2.16"/>
|
4
|
+
<!-- interface-naming-policy project-wide -->
|
5
|
+
<object class="GtkWindow" id="window1">
|
6
|
+
<property name="visible">True</property>
|
7
|
+
<property name="title" translatable="yes">Paycheck</property>
|
8
|
+
<property name="modal">True</property>
|
9
|
+
<signal name="destroy" handler="destroy_window"/>
|
10
|
+
<child>
|
11
|
+
<object class="GtkHBox" id="hbox1">
|
12
|
+
<property name="visible">True</property>
|
13
|
+
<child>
|
14
|
+
<object class="GtkVBox" id="vbox1">
|
15
|
+
<property name="visible">True</property>
|
16
|
+
<child>
|
17
|
+
<object class="GtkLabel" id="label4">
|
18
|
+
<property name="visible">True</property>
|
19
|
+
<property name="ypad">16</property>
|
20
|
+
<property name="label" translatable="yes"><big><big>Edit Paycheck</big></big></property>
|
21
|
+
<property name="use_markup">True</property>
|
22
|
+
</object>
|
23
|
+
<packing>
|
24
|
+
<property name="position">0</property>
|
25
|
+
</packing>
|
26
|
+
</child>
|
27
|
+
<child>
|
28
|
+
<object class="GtkTable" id="table1">
|
29
|
+
<property name="visible">True</property>
|
30
|
+
<property name="n_rows">3</property>
|
31
|
+
<property name="n_columns">2</property>
|
32
|
+
<property name="column_spacing">10</property>
|
33
|
+
<property name="row_spacing">15</property>
|
34
|
+
<child>
|
35
|
+
<object class="GtkEntry" id="date">
|
36
|
+
<property name="visible">True</property>
|
37
|
+
<property name="can_focus">True</property>
|
38
|
+
<property name="invisible_char">•</property>
|
39
|
+
</object>
|
40
|
+
<packing>
|
41
|
+
<property name="left_attach">1</property>
|
42
|
+
<property name="right_attach">2</property>
|
43
|
+
</packing>
|
44
|
+
</child>
|
45
|
+
<child>
|
46
|
+
<object class="GtkEntry" id="description">
|
47
|
+
<property name="visible">True</property>
|
48
|
+
<property name="can_focus">True</property>
|
49
|
+
<property name="invisible_char">•</property>
|
50
|
+
</object>
|
51
|
+
<packing>
|
52
|
+
<property name="left_attach">1</property>
|
53
|
+
<property name="right_attach">2</property>
|
54
|
+
<property name="top_attach">1</property>
|
55
|
+
<property name="bottom_attach">2</property>
|
56
|
+
</packing>
|
57
|
+
</child>
|
58
|
+
<child>
|
59
|
+
<object class="GtkEntry" id="amount">
|
60
|
+
<property name="visible">True</property>
|
61
|
+
<property name="can_focus">True</property>
|
62
|
+
<property name="invisible_char">•</property>
|
63
|
+
</object>
|
64
|
+
<packing>
|
65
|
+
<property name="left_attach">1</property>
|
66
|
+
<property name="right_attach">2</property>
|
67
|
+
<property name="top_attach">2</property>
|
68
|
+
<property name="bottom_attach">3</property>
|
69
|
+
</packing>
|
70
|
+
</child>
|
71
|
+
<child>
|
72
|
+
<object class="GtkLabel" id="label1">
|
73
|
+
<property name="visible">True</property>
|
74
|
+
<property name="xalign">1</property>
|
75
|
+
<property name="label" translatable="yes">Date:</property>
|
76
|
+
</object>
|
77
|
+
<packing>
|
78
|
+
<property name="x_options">GTK_FILL</property>
|
79
|
+
</packing>
|
80
|
+
</child>
|
81
|
+
<child>
|
82
|
+
<object class="GtkLabel" id="label2">
|
83
|
+
<property name="visible">True</property>
|
84
|
+
<property name="xalign">1</property>
|
85
|
+
<property name="label" translatable="yes">Description:</property>
|
86
|
+
</object>
|
87
|
+
<packing>
|
88
|
+
<property name="top_attach">1</property>
|
89
|
+
<property name="bottom_attach">2</property>
|
90
|
+
<property name="x_options">GTK_FILL</property>
|
91
|
+
</packing>
|
92
|
+
</child>
|
93
|
+
<child>
|
94
|
+
<object class="GtkLabel" id="label3">
|
95
|
+
<property name="visible">True</property>
|
96
|
+
<property name="xalign">1</property>
|
97
|
+
<property name="label" translatable="yes">Amount</property>
|
98
|
+
</object>
|
99
|
+
<packing>
|
100
|
+
<property name="top_attach">2</property>
|
101
|
+
<property name="bottom_attach">3</property>
|
102
|
+
<property name="x_options">GTK_FILL</property>
|
103
|
+
</packing>
|
104
|
+
</child>
|
105
|
+
</object>
|
106
|
+
<packing>
|
107
|
+
<property name="position">1</property>
|
108
|
+
</packing>
|
109
|
+
</child>
|
110
|
+
<child>
|
111
|
+
<object class="GtkHButtonBox" id="hbuttonbox1">
|
112
|
+
<property name="width_request">400</property>
|
113
|
+
<property name="visible">True</property>
|
114
|
+
<property name="spacing">30</property>
|
115
|
+
<property name="layout_style">end</property>
|
116
|
+
<child>
|
117
|
+
<object class="GtkButton" id="buttonCancel">
|
118
|
+
<property name="label" translatable="yes">Done</property>
|
119
|
+
<property name="visible">True</property>
|
120
|
+
<property name="can_focus">True</property>
|
121
|
+
<property name="receives_default">True</property>
|
122
|
+
<signal name="clicked" handler="destroy_window"/>
|
123
|
+
</object>
|
124
|
+
<packing>
|
125
|
+
<property name="expand">False</property>
|
126
|
+
<property name="fill">False</property>
|
127
|
+
<property name="position">0</property>
|
128
|
+
</packing>
|
129
|
+
</child>
|
130
|
+
</object>
|
131
|
+
<packing>
|
132
|
+
<property name="padding">15</property>
|
133
|
+
<property name="position">2</property>
|
134
|
+
</packing>
|
135
|
+
</child>
|
136
|
+
</object>
|
137
|
+
<packing>
|
138
|
+
<property name="padding">16</property>
|
139
|
+
<property name="position">0</property>
|
140
|
+
</packing>
|
141
|
+
</child>
|
142
|
+
</object>
|
143
|
+
</child>
|
144
|
+
</object>
|
145
|
+
</interface>
|
Binary file
|
@@ -0,0 +1,20 @@
|
|
1
|
+
--- !ruby/object:VR_ENV
|
2
|
+
backup_path: /home/eric
|
3
|
+
browser: firefox
|
4
|
+
current_file: /home/eric/vrp/vrx/visualruby_examples/all_widgets/all_widgets.rb
|
5
|
+
font_name: Monospace 10
|
6
|
+
glade_path: glade-3
|
7
|
+
height: 649
|
8
|
+
open_files:
|
9
|
+
- /home/eric/vrp/vrx/visualruby_examples/all_widgets/bin/AllWidgets.rb
|
10
|
+
- /home/eric/vrp/vrx/visualruby_examples/all_widgets/all_widgets.rb
|
11
|
+
open_folders:
|
12
|
+
- /home/eric/vrp/vrx/visualruby_examples/all_widgets
|
13
|
+
- /home/eric/vrp/vrx/visualruby_examples/all_widgets/bin
|
14
|
+
- /home/eric/vrp/vrx/visualruby_examples/all_widgets/bin/glade
|
15
|
+
panel_pos: 360
|
16
|
+
rdoc_command_line: rdoc -x README
|
17
|
+
run_command_line: ruby all_widgets.rb
|
18
|
+
tab_spaces: 2
|
19
|
+
width: 1119
|
20
|
+
builder: !ruby/object:Gtk::Builder {}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
|
3
|
+
require 'vrlib'
|
4
|
+
|
5
|
+
#make program output in real time so errors visible in VR.
|
6
|
+
STDOUT.sync = true
|
7
|
+
STDERR.sync = true
|
8
|
+
|
9
|
+
#everything in these directories will be included
|
10
|
+
my_path = File.expand_path(File.dirname(__FILE__))
|
11
|
+
require_all Dir.glob(my_path + "/bin/**/*.rb")
|
12
|
+
AllWidgets.new.show
|
13
|
+
|
@@ -0,0 +1,43 @@
|
|
1
|
+
##
|
2
|
+
# This file shows all the widget types that auto-fill when you
|
3
|
+
# call set_glade variables(). You can use any type of
|
4
|
+
# widget in your programs, but you'll need to populate
|
5
|
+
# them yourself using the @builder for your class. An example
|
6
|
+
# of using the @builder to populate a widget is in the code
|
7
|
+
# below: The checkbutton is populated automatically with
|
8
|
+
# the value "true," but the label of the checkbutton needs
|
9
|
+
# to be set in glade, or here in your code. This line set the
|
10
|
+
# label:
|
11
|
+
#
|
12
|
+
# @builder["checkbutton1"].label = "I'm a Check Button"
|
13
|
+
#
|
14
|
+
# You can see the result when you run the program.
|
15
|
+
#
|
16
|
+
# Note: you must add an "adjustment" object to the spinbutton in glade
|
17
|
+
# to make it work.
|
18
|
+
#
|
19
|
+
|
20
|
+
class AllWidgets
|
21
|
+
|
22
|
+
include GladeGUI
|
23
|
+
|
24
|
+
def show()
|
25
|
+
load_glade(__FILE__) #loads file, glade/MyClass.glade into @builder
|
26
|
+
@label1 = "I'm a Label"
|
27
|
+
@checkbutton1 = true
|
28
|
+
@builder["checkbutton1"].label = "I'm a Check Button" #this could be set in glade
|
29
|
+
@image1 = "bin/splash.png"
|
30
|
+
@linkbutton1 = "http://www.visualruby.net"
|
31
|
+
@entry1 = "I'm an Entry Box"
|
32
|
+
@progressbar1 = 0.85 # text property set in glade
|
33
|
+
@textview1 = "I'm a Textview"
|
34
|
+
@spinbutton1 = 10.5
|
35
|
+
@fontbutton1 = "Courier 10"
|
36
|
+
@calendar1 = DateTime.new(2011, 5, 14)
|
37
|
+
set_glade_variables() #populates glade controls with insance variables (i.e. Myclass.label1)
|
38
|
+
show_window()
|
39
|
+
end
|
40
|
+
|
41
|
+
|
42
|
+
end
|
43
|
+
|