visualruby 1.0.19 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Splash.rb +40 -0
- data/bin/editor/VR_Document.rb +81 -74
- data/bin/editor/VR_TabSearch.rb +5 -7
- data/bin/editor/VR_Tabs.rb +57 -36
- data/bin/editor/VR_TextShell.rb +12 -34
- data/bin/editor/VR_TextViewCommon.rb +9 -28
- data/bin/main/NewProjectGUI.rb +14 -13
- data/bin/main/OpenProject.rb +69 -0
- data/bin/main/ProjectChooserView.rb +3 -2
- data/bin/main/ProjectTree.rb +25 -0
- data/bin/main/RubygemsAPI.rb +15 -11
- data/bin/main/VR_ENV.rb +38 -60
- data/bin/main/VR_ENV_GLOBAL.rb +45 -44
- data/bin/main/VR_File_Tree.rb +29 -21
- data/bin/main/VR_Local_Gem_Tree.rb +4 -19
- data/bin/main/VR_Main.rb +128 -144
- data/bin/main/VR_Remote_Gem_Tree.rb +6 -19
- data/bin/main/glade/NewProjectGUI.glade +94 -98
- data/bin/main/glade/OpenProject.glade +259 -0
- data/bin/main/glade/RubygemsAPI.glade +98 -62
- data/bin/main/glade/VR_ENV.glade +46 -55
- data/bin/main/glade/VR_ENV_GLOBAL.glade +251 -180
- data/bin/main/glade/VR_File_Tree.glade +25 -16
- data/bin/main/glade/VR_Local_Gem_Tree.glade +16 -8
- data/bin/main/glade/VR_Main.glade +410 -449
- data/bin/main/glade/VR_Remote_Gem_Tree.glade +33 -31
- data/bin/tools/VR_Tools.rb +60 -46
- data/{visualruby_examples → examples}/active_record/active_record.rb +16 -10
- data/{visualruby_examples → examples}/active_record/bin/ChoosePerson.rb +7 -0
- data/examples/active_record/bin/Person.rb +21 -0
- data/examples/active_record/bin/glade/ChoosePerson.glade +89 -0
- data/examples/active_record/bin/glade/Person.glade +197 -0
- data/{visualruby_examples → examples}/active_record/db/development.sqlite3 +0 -0
- data/{visualruby_examples → examples}/active_record2/bin/CompanyGUI.rb +7 -7
- data/{visualruby_examples → examples}/active_record2/bin/Employee.rb +0 -0
- data/{visualruby_examples → examples}/active_record2/bin/Employer.rb +0 -0
- data/{visualruby_examples → examples}/active_record2/bin/Paycheck.rb +0 -0
- data/examples/active_record2/bin/glade/CompanyGUI.glade +149 -0
- data/examples/active_record2/bin/glade/Employee.glade +126 -0
- data/{visualruby_examples → examples}/active_record2/bin/glade/Employer.glade +0 -0
- data/{visualruby_examples → examples}/active_record2/bin/glade/Paycheck.glade +0 -0
- data/{visualruby_examples → examples}/active_record2/db/development.sqlite3 +0 -0
- data/{visualruby_examples → examples}/active_record2/main.rb +15 -9
- data/examples/alert_box/bin/AlertBoxDemo.rb +80 -0
- data/examples/alert_box/bin/glade/AlertBoxDemo.glade +234 -0
- data/examples/alert_box/main.rb +12 -0
- data/{visualruby_examples → examples}/all_widgets/bin/AllWidgets.rb +18 -10
- data/{visualruby_examples → examples}/all_widgets/bin/glade/AllWidgets.glade +52 -16
- data/{visualruby_examples → examples}/all_widgets/bin/splash.png +0 -0
- data/examples/all_widgets/main.rb +12 -0
- data/{visualruby_examples → examples}/calculator/bin/Calculator.rb +23 -22
- data/{visualruby_examples → examples}/calculator/bin/glade/Calculator.glade +81 -51
- data/examples/calculator/main.rb +13 -0
- data/examples/child_window/bin/ChildWindowDemo.rb +52 -0
- data/examples/child_window/bin/ModalWindow.rb +9 -0
- data/examples/child_window/bin/ModelessWindow.rb +9 -0
- data/examples/child_window/bin/MyChildClass.rb +21 -0
- data/examples/child_window/bin/glade/ChildWindowDemo.glade +87 -0
- data/examples/child_window/bin/glade/ModalWindow.glade +61 -0
- data/examples/child_window/bin/glade/ModelessWindow.glade +61 -0
- data/{visualruby_examples → examples}/child_window/bin/glade/MyChildClass.glade +14 -12
- data/examples/child_window/main.rb +12 -0
- data/{visualruby_examples → examples}/drag_drop/bin/DragDropDemo.rb +9 -10
- data/examples/drag_drop/bin/glade/DragDropDemo.glade +161 -0
- data/{visualruby_examples → examples}/drag_drop/img/folder.png +0 -0
- data/{visualruby_examples → examples}/drag_drop/img/glade.png +0 -0
- data/{visualruby_examples → examples}/drag_drop/img/gtk-edit.png +0 -0
- data/{visualruby_examples → examples}/drag_drop/img/obj.png +0 -0
- data/{visualruby_examples → examples}/drag_drop/img/png.png +0 -0
- data/{visualruby_examples → examples}/drag_drop/img/rb.png +0 -0
- data/{visualruby_examples → examples}/drag_drop/img/ruby.png +0 -0
- data/{visualruby_examples → examples}/drag_drop/img/unknown.png +0 -0
- data/examples/drag_drop/main.rb +11 -0
- data/examples/filetreeview/bin/ProjectTree.rb +32 -0
- data/examples/filetreeview/bin/ProjectTreeGUI.rb +28 -0
- data/examples/filetreeview/bin/glade/ProjectTreeGUI.glade +156 -0
- data/examples/filetreeview/main.rb +13 -0
- data/{visualruby_examples → examples}/listview/bin/SongListView.rb +24 -20
- data/{visualruby_examples → examples}/listview/bin/SongListViewGUI.rb +12 -11
- data/{visualruby_examples → examples}/listview/bin/audio-x-generic.png +0 -0
- data/examples/listview/bin/glade/SongListViewGUI.glade +195 -0
- data/examples/listview/main.rb +10 -0
- data/examples/listview_objects/bin/DataObject.rb +53 -0
- data/{visualruby_examples → examples}/listview_objects/bin/ListViewObjects.rb +7 -4
- data/examples/listview_objects/bin/ListViewObjectsGUI.rb +26 -0
- data/examples/listview_objects/bin/glade/DataObject.glade +196 -0
- data/examples/listview_objects/bin/glade/ListViewObjectsGUI.glade +87 -0
- data/examples/listview_objects/main.rb +12 -0
- data/examples/settings_file/bin/MainApp.rb +38 -0
- data/examples/settings_file/bin/SavableSettings.rb +39 -0
- data/examples/settings_file/bin/glade/MainApp.glade +87 -0
- data/examples/settings_file/bin/glade/SavableSettings.glade +162 -0
- data/examples/settings_file/main.rb +14 -0
- data/examples/settings_file/settings.yaml +15 -0
- data/examples/simple_ruby_gui/bin/DataObjectGUI.rb +21 -0
- data/examples/simple_ruby_gui/bin/glade/DataObjectGUI.glade +195 -0
- data/examples/simple_ruby_gui/main.rb +16 -0
- data/{visualruby_examples → examples}/treeview/bin/MyClass.rb +1 -5
- data/examples/treeview/bin/glade/MyClass.glade +24 -0
- data/examples/treeview/main.rb +13 -0
- data/skeleton/document/New.glade +3 -4
- data/skeleton/document/NewWindow.rb +1 -1
- data/skeleton/project/bin/MyClass.rb +2 -2
- data/skeleton/project/bin/glade/MyClass.glade +12 -26
- data/skeleton/project/main.rb +4 -8
- data/vr +41 -37
- data/vrlib/lib/Alert.rb +67 -0
- data/vrlib/lib/DragDrop.rb +90 -0
- data/vrlib/lib/GladeGUI.rb +433 -0
- data/vrlib/lib/IconHash.rb +18 -0
- data/vrlib/lib/SavableClass.rb +56 -0
- data/vrlib/lib/SimpleComboBoxEntry.rb +8 -0
- data/vrlib/lib/glade/Alert.glade +119 -0
- data/vrlib/lib/treeview/FileTreeView.rb +113 -0
- data/vrlib/lib/treeview/IterMethods.rb +82 -0
- data/vrlib/lib/treeview/ListView.rb +85 -0
- data/vrlib/lib/treeview/TreeView.rb +43 -0
- data/vrlib/lib/treeview/ViewCommon.rb +370 -0
- data/vrlib/lib/treeview/columns/CalendarCol.rb +89 -0
- data/vrlib/lib/treeview/columns/CellRendererCombo.rb +66 -0
- data/vrlib/lib/treeview/columns/CellRendererDate.rb +45 -0
- data/vrlib/lib/treeview/columns/CellRendererObject.rb +57 -0
- data/vrlib/lib/treeview/columns/CellRendererPhone.rb +45 -0
- data/vrlib/lib/treeview/columns/CellRendererPixbuf.rb +16 -0
- data/vrlib/lib/treeview/columns/CellRendererProgress.rb +17 -0
- data/vrlib/lib/treeview/columns/CellRendererSpin.rb +37 -0
- data/vrlib/lib/treeview/columns/CellRendererText.rb +38 -0
- data/vrlib/lib/treeview/columns/CellRendererToggle.rb +47 -0
- data/vrlib/lib/treeview/columns/ComboCol.rb +43 -0
- data/vrlib/lib/treeview/columns/CurrencyCol.rb +23 -0
- data/vrlib/lib/treeview/columns/DateCol.rb +20 -0
- data/vrlib/lib/treeview/columns/ImageCol.rb +27 -0
- data/vrlib/lib/treeview/columns/ProgressCol.rb +27 -0
- data/vrlib/lib/treeview/columns/SpinCol.rb +11 -0
- data/vrlib/lib/treeview/columns/TextCol.rb +65 -0
- data/vrlib/lib/treeview/columns/TreeViewColumn.rb +93 -0
- data/{bin/main/glade/ProjectChooserGUI.glade → vrlib/lib/treeview/columns/glade/CalendarCol.glade} +71 -63
- data/{bin/main/glade/Splash.glade → vrlib/lib/treeview/columns/glade/ImageCol.glade} +5 -6
- data/vrlib/lib/treeview/columns/glade/TextCol.glade +82 -0
- data/vrlib/rdoc_replace.yaml +77 -0
- data/vrlib/vrlib.rb +7 -0
- metadata +163 -136
- data/bin/editor/glade/VR_Document.glade +0 -160
- data/bin/main/ProjectChooserGUI.rb +0 -41
- data/bin/main/Splash.rb +0 -22
- data/visualruby_examples/active_record/.vr_settings.yaml +0 -47
- data/visualruby_examples/active_record/bin/Person.rb +0 -13
- data/visualruby_examples/active_record/bin/glade/ChoosePerson.glade +0 -61
- data/visualruby_examples/active_record/bin/glade/Person.glade +0 -148
- data/visualruby_examples/active_record2/.vr_settings.yaml +0 -16
- data/visualruby_examples/active_record2/bin/glade/CompanyGUI.glade +0 -167
- data/visualruby_examples/active_record2/bin/glade/Employee.glade +0 -123
- data/visualruby_examples/all_widgets/.vr_settings.yaml +0 -13
- data/visualruby_examples/all_widgets/main.rb +0 -14
- data/visualruby_examples/calculator/.vr_settings.yaml +0 -11
- data/visualruby_examples/calculator/main.rb +0 -13
- data/visualruby_examples/child_window/.vr_settings.yaml +0 -16
- data/visualruby_examples/child_window/bin/ChildWindowDemo.rb +0 -39
- data/visualruby_examples/child_window/bin/MyChildClass.rb +0 -40
- data/visualruby_examples/child_window/bin/glade/ChildWindowDemo.glade +0 -101
- data/visualruby_examples/child_window/main.rb +0 -13
- data/visualruby_examples/drag_drop/.vr_settings.yaml +0 -12
- data/visualruby_examples/drag_drop/bin/glade/DragDropDemo.glade +0 -143
- data/visualruby_examples/drag_drop/main.rb +0 -14
- data/visualruby_examples/listview/.vr_settings.yaml +0 -12
- data/visualruby_examples/listview/bin/glade/SongListViewGUI.glade +0 -220
- data/visualruby_examples/listview/main.rb +0 -19
- data/visualruby_examples/listview_objects/.vr_settings.yaml +0 -16
- data/visualruby_examples/listview_objects/bin/DataObject.rb +0 -32
- data/visualruby_examples/listview_objects/bin/DataObjectGUI.rb +0 -41
- data/visualruby_examples/listview_objects/bin/ListViewObjectsGUI.rb +0 -18
- data/visualruby_examples/listview_objects/bin/glade/DataObject.glade +0 -198
- data/visualruby_examples/listview_objects/bin/glade/ListViewObjectsGUI.glade +0 -102
- data/visualruby_examples/listview_objects/main.rb +0 -13
- data/visualruby_examples/simple_ruby_gui/.vr_settings.yaml +0 -16
- data/visualruby_examples/simple_ruby_gui/bin/DataObjectGUI.rb +0 -20
- data/visualruby_examples/simple_ruby_gui/bin/glade/DataObjectGUI.glade +0 -163
- data/visualruby_examples/simple_ruby_gui/main.rb +0 -16
- data/visualruby_examples/treeview/.vr_settings.yaml +0 -12
- data/visualruby_examples/treeview/bin/glade/MyClass.glade +0 -48
- data/visualruby_examples/treeview/main.rb +0 -14
@@ -1,41 +1,57 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!-- Generated with glade 3.16.1 -->
|
2
3
|
<interface>
|
3
|
-
<requires lib="gtk+" version="
|
4
|
-
<!-- interface-naming-policy project-wide -->
|
4
|
+
<requires lib="gtk+" version="3.0"/>
|
5
5
|
<object class="GtkWindow" id="window1">
|
6
|
-
<property name="
|
7
|
-
<property name="window_position">center
|
8
|
-
<signal name="destroy" handler="destroy_window"/>
|
6
|
+
<property name="can_focus">False</property>
|
7
|
+
<property name="window_position">center</property>
|
9
8
|
<child>
|
10
|
-
<object class="
|
9
|
+
<object class="GtkBox" id="box1">
|
11
10
|
<property name="visible">True</property>
|
11
|
+
<property name="can_focus">False</property>
|
12
|
+
<property name="margin_left">8</property>
|
13
|
+
<property name="margin_right">8</property>
|
14
|
+
<property name="margin_top">8</property>
|
15
|
+
<property name="margin_bottom">12</property>
|
16
|
+
<property name="orientation">vertical</property>
|
17
|
+
<property name="spacing">8</property>
|
12
18
|
<child>
|
13
19
|
<object class="GtkEntry" id="display">
|
14
20
|
<property name="visible">True</property>
|
15
|
-
<property name="can_focus">
|
21
|
+
<property name="can_focus">False</property>
|
16
22
|
<property name="editable">False</property>
|
17
|
-
<property name="invisible_char">•</property>
|
18
23
|
<property name="xalign">1</property>
|
19
24
|
</object>
|
20
25
|
<packing>
|
26
|
+
<property name="expand">False</property>
|
27
|
+
<property name="fill">True</property>
|
21
28
|
<property name="position">0</property>
|
22
29
|
</packing>
|
23
30
|
</child>
|
24
31
|
<child>
|
25
|
-
<object class="
|
32
|
+
<object class="GtkGrid" id="grid1">
|
26
33
|
<property name="visible">True</property>
|
27
|
-
<property name="
|
28
|
-
<property name="
|
34
|
+
<property name="can_focus">False</property>
|
35
|
+
<property name="row_spacing">3</property>
|
36
|
+
<property name="column_spacing">3</property>
|
37
|
+
<property name="row_homogeneous">True</property>
|
38
|
+
<property name="column_homogeneous">True</property>
|
29
39
|
<child>
|
30
|
-
<object class="GtkButton" id="
|
40
|
+
<object class="GtkButton" id="button[0]">
|
31
41
|
<property name="label" translatable="yes">button</property>
|
32
42
|
<property name="visible">True</property>
|
33
43
|
<property name="can_focus">True</property>
|
34
44
|
<property name="receives_default">True</property>
|
35
45
|
</object>
|
46
|
+
<packing>
|
47
|
+
<property name="left_attach">0</property>
|
48
|
+
<property name="top_attach">0</property>
|
49
|
+
<property name="width">1</property>
|
50
|
+
<property name="height">1</property>
|
51
|
+
</packing>
|
36
52
|
</child>
|
37
53
|
<child>
|
38
|
-
<object class="GtkButton" id="
|
54
|
+
<object class="GtkButton" id="button[1]">
|
39
55
|
<property name="label" translatable="yes">button</property>
|
40
56
|
<property name="visible">True</property>
|
41
57
|
<property name="can_focus">True</property>
|
@@ -43,11 +59,13 @@
|
|
43
59
|
</object>
|
44
60
|
<packing>
|
45
61
|
<property name="left_attach">1</property>
|
46
|
-
<property name="
|
62
|
+
<property name="top_attach">0</property>
|
63
|
+
<property name="width">1</property>
|
64
|
+
<property name="height">1</property>
|
47
65
|
</packing>
|
48
66
|
</child>
|
49
67
|
<child>
|
50
|
-
<object class="GtkButton" id="
|
68
|
+
<object class="GtkButton" id="button[2]">
|
51
69
|
<property name="label" translatable="yes">button</property>
|
52
70
|
<property name="visible">True</property>
|
53
71
|
<property name="can_focus">True</property>
|
@@ -55,11 +73,13 @@
|
|
55
73
|
</object>
|
56
74
|
<packing>
|
57
75
|
<property name="left_attach">2</property>
|
58
|
-
<property name="
|
76
|
+
<property name="top_attach">0</property>
|
77
|
+
<property name="width">1</property>
|
78
|
+
<property name="height">1</property>
|
59
79
|
</packing>
|
60
80
|
</child>
|
61
81
|
<child>
|
62
|
-
<object class="GtkButton" id="
|
82
|
+
<object class="GtkButton" id="button[3]">
|
63
83
|
<property name="label" translatable="yes">button</property>
|
64
84
|
<property name="visible">True</property>
|
65
85
|
<property name="can_focus">True</property>
|
@@ -67,23 +87,27 @@
|
|
67
87
|
</object>
|
68
88
|
<packing>
|
69
89
|
<property name="left_attach">3</property>
|
70
|
-
<property name="
|
90
|
+
<property name="top_attach">0</property>
|
91
|
+
<property name="width">1</property>
|
92
|
+
<property name="height">1</property>
|
71
93
|
</packing>
|
72
94
|
</child>
|
73
95
|
<child>
|
74
|
-
<object class="GtkButton" id="
|
96
|
+
<object class="GtkButton" id="button[4]">
|
75
97
|
<property name="label" translatable="yes">button</property>
|
76
98
|
<property name="visible">True</property>
|
77
99
|
<property name="can_focus">True</property>
|
78
100
|
<property name="receives_default">True</property>
|
79
101
|
</object>
|
80
102
|
<packing>
|
103
|
+
<property name="left_attach">0</property>
|
81
104
|
<property name="top_attach">1</property>
|
82
|
-
<property name="
|
105
|
+
<property name="width">1</property>
|
106
|
+
<property name="height">1</property>
|
83
107
|
</packing>
|
84
108
|
</child>
|
85
109
|
<child>
|
86
|
-
<object class="GtkButton" id="
|
110
|
+
<object class="GtkButton" id="button[5]">
|
87
111
|
<property name="label" translatable="yes">button</property>
|
88
112
|
<property name="visible">True</property>
|
89
113
|
<property name="can_focus">True</property>
|
@@ -91,13 +115,13 @@
|
|
91
115
|
</object>
|
92
116
|
<packing>
|
93
117
|
<property name="left_attach">1</property>
|
94
|
-
<property name="right_attach">2</property>
|
95
118
|
<property name="top_attach">1</property>
|
96
|
-
<property name="
|
119
|
+
<property name="width">1</property>
|
120
|
+
<property name="height">1</property>
|
97
121
|
</packing>
|
98
122
|
</child>
|
99
123
|
<child>
|
100
|
-
<object class="GtkButton" id="
|
124
|
+
<object class="GtkButton" id="button[6]">
|
101
125
|
<property name="label" translatable="yes">button</property>
|
102
126
|
<property name="visible">True</property>
|
103
127
|
<property name="can_focus">True</property>
|
@@ -105,13 +129,13 @@
|
|
105
129
|
</object>
|
106
130
|
<packing>
|
107
131
|
<property name="left_attach">2</property>
|
108
|
-
<property name="right_attach">3</property>
|
109
132
|
<property name="top_attach">1</property>
|
110
|
-
<property name="
|
133
|
+
<property name="width">1</property>
|
134
|
+
<property name="height">1</property>
|
111
135
|
</packing>
|
112
136
|
</child>
|
113
137
|
<child>
|
114
|
-
<object class="GtkButton" id="
|
138
|
+
<object class="GtkButton" id="button[7]">
|
115
139
|
<property name="label" translatable="yes">button</property>
|
116
140
|
<property name="visible">True</property>
|
117
141
|
<property name="can_focus">True</property>
|
@@ -119,25 +143,27 @@
|
|
119
143
|
</object>
|
120
144
|
<packing>
|
121
145
|
<property name="left_attach">3</property>
|
122
|
-
<property name="right_attach">4</property>
|
123
146
|
<property name="top_attach">1</property>
|
124
|
-
<property name="
|
147
|
+
<property name="width">1</property>
|
148
|
+
<property name="height">1</property>
|
125
149
|
</packing>
|
126
150
|
</child>
|
127
151
|
<child>
|
128
|
-
<object class="GtkButton" id="
|
152
|
+
<object class="GtkButton" id="button[8]">
|
129
153
|
<property name="label" translatable="yes">button</property>
|
130
154
|
<property name="visible">True</property>
|
131
155
|
<property name="can_focus">True</property>
|
132
156
|
<property name="receives_default">True</property>
|
133
157
|
</object>
|
134
158
|
<packing>
|
159
|
+
<property name="left_attach">0</property>
|
135
160
|
<property name="top_attach">2</property>
|
136
|
-
<property name="
|
161
|
+
<property name="width">1</property>
|
162
|
+
<property name="height">1</property>
|
137
163
|
</packing>
|
138
164
|
</child>
|
139
165
|
<child>
|
140
|
-
<object class="GtkButton" id="
|
166
|
+
<object class="GtkButton" id="button[9]">
|
141
167
|
<property name="label" translatable="yes">button</property>
|
142
168
|
<property name="visible">True</property>
|
143
169
|
<property name="can_focus">True</property>
|
@@ -145,13 +171,13 @@
|
|
145
171
|
</object>
|
146
172
|
<packing>
|
147
173
|
<property name="left_attach">1</property>
|
148
|
-
<property name="right_attach">2</property>
|
149
174
|
<property name="top_attach">2</property>
|
150
|
-
<property name="
|
175
|
+
<property name="width">1</property>
|
176
|
+
<property name="height">1</property>
|
151
177
|
</packing>
|
152
178
|
</child>
|
153
179
|
<child>
|
154
|
-
<object class="GtkButton" id="
|
180
|
+
<object class="GtkButton" id="button[10]">
|
155
181
|
<property name="label" translatable="yes">button</property>
|
156
182
|
<property name="visible">True</property>
|
157
183
|
<property name="can_focus">True</property>
|
@@ -159,13 +185,13 @@
|
|
159
185
|
</object>
|
160
186
|
<packing>
|
161
187
|
<property name="left_attach">2</property>
|
162
|
-
<property name="right_attach">3</property>
|
163
188
|
<property name="top_attach">2</property>
|
164
|
-
<property name="
|
189
|
+
<property name="width">1</property>
|
190
|
+
<property name="height">1</property>
|
165
191
|
</packing>
|
166
192
|
</child>
|
167
193
|
<child>
|
168
|
-
<object class="GtkButton" id="
|
194
|
+
<object class="GtkButton" id="button[11]">
|
169
195
|
<property name="label" translatable="yes">button</property>
|
170
196
|
<property name="visible">True</property>
|
171
197
|
<property name="can_focus">True</property>
|
@@ -173,25 +199,27 @@
|
|
173
199
|
</object>
|
174
200
|
<packing>
|
175
201
|
<property name="left_attach">3</property>
|
176
|
-
<property name="right_attach">4</property>
|
177
202
|
<property name="top_attach">2</property>
|
178
|
-
<property name="
|
203
|
+
<property name="width">1</property>
|
204
|
+
<property name="height">1</property>
|
179
205
|
</packing>
|
180
206
|
</child>
|
181
207
|
<child>
|
182
|
-
<object class="GtkButton" id="
|
208
|
+
<object class="GtkButton" id="button[12]">
|
183
209
|
<property name="label" translatable="yes">button</property>
|
184
210
|
<property name="visible">True</property>
|
185
211
|
<property name="can_focus">True</property>
|
186
212
|
<property name="receives_default">True</property>
|
187
213
|
</object>
|
188
214
|
<packing>
|
215
|
+
<property name="left_attach">0</property>
|
189
216
|
<property name="top_attach">3</property>
|
190
|
-
<property name="
|
217
|
+
<property name="width">1</property>
|
218
|
+
<property name="height">1</property>
|
191
219
|
</packing>
|
192
220
|
</child>
|
193
221
|
<child>
|
194
|
-
<object class="GtkButton" id="
|
222
|
+
<object class="GtkButton" id="button[13]">
|
195
223
|
<property name="label" translatable="yes">button</property>
|
196
224
|
<property name="visible">True</property>
|
197
225
|
<property name="can_focus">True</property>
|
@@ -199,13 +227,13 @@
|
|
199
227
|
</object>
|
200
228
|
<packing>
|
201
229
|
<property name="left_attach">1</property>
|
202
|
-
<property name="right_attach">2</property>
|
203
230
|
<property name="top_attach">3</property>
|
204
|
-
<property name="
|
231
|
+
<property name="width">1</property>
|
232
|
+
<property name="height">1</property>
|
205
233
|
</packing>
|
206
234
|
</child>
|
207
235
|
<child>
|
208
|
-
<object class="GtkButton" id="
|
236
|
+
<object class="GtkButton" id="button[14]">
|
209
237
|
<property name="label" translatable="yes">button</property>
|
210
238
|
<property name="visible">True</property>
|
211
239
|
<property name="can_focus">True</property>
|
@@ -213,13 +241,13 @@
|
|
213
241
|
</object>
|
214
242
|
<packing>
|
215
243
|
<property name="left_attach">2</property>
|
216
|
-
<property name="right_attach">3</property>
|
217
244
|
<property name="top_attach">3</property>
|
218
|
-
<property name="
|
245
|
+
<property name="width">1</property>
|
246
|
+
<property name="height">1</property>
|
219
247
|
</packing>
|
220
248
|
</child>
|
221
249
|
<child>
|
222
|
-
<object class="GtkButton" id="
|
250
|
+
<object class="GtkButton" id="button[15]">
|
223
251
|
<property name="label" translatable="yes">button</property>
|
224
252
|
<property name="visible">True</property>
|
225
253
|
<property name="can_focus">True</property>
|
@@ -227,13 +255,15 @@
|
|
227
255
|
</object>
|
228
256
|
<packing>
|
229
257
|
<property name="left_attach">3</property>
|
230
|
-
<property name="right_attach">4</property>
|
231
258
|
<property name="top_attach">3</property>
|
232
|
-
<property name="
|
259
|
+
<property name="width">1</property>
|
260
|
+
<property name="height">1</property>
|
233
261
|
</packing>
|
234
262
|
</child>
|
235
263
|
</object>
|
236
264
|
<packing>
|
265
|
+
<property name="expand">False</property>
|
266
|
+
<property name="fill">True</property>
|
237
267
|
<property name="position">1</property>
|
238
268
|
</packing>
|
239
269
|
</child>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
|
3
|
+
# Updated for Gtk3!
|
4
|
+
|
5
|
+
# ignore -- this is for development, same as require 'vrlib'
|
6
|
+
require File.exists?("./../../vrlib/vrlib.rb") ? "./../../vrlib/vrlib.rb" : "vrlib"
|
7
|
+
|
8
|
+
# from require_all gem:
|
9
|
+
require_rel 'bin/'
|
10
|
+
|
11
|
+
|
12
|
+
Calculator.new.show_glade()
|
13
|
+
|
@@ -0,0 +1,52 @@
|
|
1
|
+
|
2
|
+
##
|
3
|
+
# This is a "main" GUI class for a program. It allows you
|
4
|
+
# to open modal and non-modal windows.
|
5
|
+
#
|
6
|
+
# Modal windows are
|
7
|
+
# windows that appear on top of the main program window and
|
8
|
+
# halt the main window until they are closed. They're good for
|
9
|
+
# dialogs etc.
|
10
|
+
#
|
11
|
+
# Normal non-modal windows operate concurrently with the main
|
12
|
+
# window and each other. You can open many child windows, and they
|
13
|
+
# will all function at the same time. For example, they're useful if you're
|
14
|
+
# opening several documents at the same time.
|
15
|
+
#
|
16
|
+
# To open a modal window, set the "modal" property in glade then call the show_glade()
|
17
|
+
# method with the parent
|
18
|
+
# as the aregument. Almost always, you will be calling the show method
|
19
|
+
# from within the parent window so you would pass "self" as the argument:
|
20
|
+
#
|
21
|
+
# ChildWindow.new.show_glade(self)
|
22
|
+
#
|
23
|
+
# This line would open a new ChildWindow window that always appears on top
|
24
|
+
# of the parent (self) window, and freezes the parent window until it closes.
|
25
|
+
#
|
26
|
+
|
27
|
+
|
28
|
+
class ChildWindowDemo #(change name)
|
29
|
+
|
30
|
+
include GladeGUI
|
31
|
+
|
32
|
+
def buttonOpenModeless__clicked(*argv)
|
33
|
+
ModelessWindow.new.show_glade() # no parent given so windows can overlap
|
34
|
+
end
|
35
|
+
|
36
|
+
# This modal window has its "modal" property set to true in glade.
|
37
|
+
# I pass a reference to "self" in the show method, setting the parent to this window,
|
38
|
+
# making it always on top. Its a good idea to have modal windows always on top
|
39
|
+
# because the parent is frozen, so the next action must be in the modal window.
|
40
|
+
|
41
|
+
def buttonOpenModal__clicked(*argv)
|
42
|
+
ModalWindow.new.show_glade(self) # self = parent, so always on top of parent
|
43
|
+
end
|
44
|
+
|
45
|
+
def buttonCancel__clicked(*argv)
|
46
|
+
@builder["window1"].destroy
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
|
51
|
+
|
52
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
##
|
2
|
+
# This is just a generic window that gets opened as either modal
|
3
|
+
# or non-modal.
|
4
|
+
#
|
5
|
+
|
6
|
+
class MyChildClass
|
7
|
+
|
8
|
+
include GladeGUI
|
9
|
+
|
10
|
+
def initialize(title, message)
|
11
|
+
@labelMessage = message
|
12
|
+
@window1 = title
|
13
|
+
end
|
14
|
+
|
15
|
+
# When cancel clicked in MyChildClass.glade
|
16
|
+
def buttonCancel__clicked(*args)
|
17
|
+
@builder["window1"].destroy
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
|
@@ -0,0 +1,87 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!-- Generated with glade 3.18.3 -->
|
3
|
+
<interface>
|
4
|
+
<requires lib="gtk+" version="3.0"/>
|
5
|
+
<object class="GtkWindow" id="window1">
|
6
|
+
<property name="can_focus">False</property>
|
7
|
+
<property name="window_position">center</property>
|
8
|
+
<property name="default_width">400</property>
|
9
|
+
<child>
|
10
|
+
<object class="GtkBox" id="box1">
|
11
|
+
<property name="visible">True</property>
|
12
|
+
<property name="can_focus">False</property>
|
13
|
+
<property name="margin_left">20</property>
|
14
|
+
<property name="margin_right">20</property>
|
15
|
+
<property name="orientation">vertical</property>
|
16
|
+
<child>
|
17
|
+
<object class="GtkLabel" id="label1">
|
18
|
+
<property name="visible">True</property>
|
19
|
+
<property name="can_focus">False</property>
|
20
|
+
<property name="xpad">10</property>
|
21
|
+
<property name="ypad">10</property>
|
22
|
+
<property name="label" translatable="yes">Open as many modeless windows as you want. You can switch between windows because they're not modal. When you open a Modal window it will block everything until its closed.</property>
|
23
|
+
<property name="wrap">True</property>
|
24
|
+
</object>
|
25
|
+
<packing>
|
26
|
+
<property name="expand">True</property>
|
27
|
+
<property name="fill">True</property>
|
28
|
+
<property name="padding">10</property>
|
29
|
+
<property name="position">0</property>
|
30
|
+
</packing>
|
31
|
+
</child>
|
32
|
+
<child>
|
33
|
+
<object class="GtkButtonBox" id="buttonbox1">
|
34
|
+
<property name="visible">True</property>
|
35
|
+
<property name="can_focus">False</property>
|
36
|
+
<property name="layout_style">spread</property>
|
37
|
+
<child>
|
38
|
+
<object class="GtkButton" id="buttonOpenModeless">
|
39
|
+
<property name="label" translatable="yes">Open Modeless Window</property>
|
40
|
+
<property name="visible">True</property>
|
41
|
+
<property name="can_focus">True</property>
|
42
|
+
<property name="receives_default">True</property>
|
43
|
+
</object>
|
44
|
+
<packing>
|
45
|
+
<property name="expand">False</property>
|
46
|
+
<property name="fill">True</property>
|
47
|
+
<property name="position">0</property>
|
48
|
+
</packing>
|
49
|
+
</child>
|
50
|
+
<child>
|
51
|
+
<object class="GtkButton" id="buttonOpenModal">
|
52
|
+
<property name="label" translatable="yes">Open Modal Window</property>
|
53
|
+
<property name="visible">True</property>
|
54
|
+
<property name="can_focus">True</property>
|
55
|
+
<property name="receives_default">True</property>
|
56
|
+
</object>
|
57
|
+
<packing>
|
58
|
+
<property name="expand">False</property>
|
59
|
+
<property name="fill">True</property>
|
60
|
+
<property name="position">1</property>
|
61
|
+
</packing>
|
62
|
+
</child>
|
63
|
+
<child>
|
64
|
+
<object class="GtkButton" id="buttonCancel">
|
65
|
+
<property name="label" translatable="yes">Cancel</property>
|
66
|
+
<property name="visible">True</property>
|
67
|
+
<property name="can_focus">True</property>
|
68
|
+
<property name="receives_default">True</property>
|
69
|
+
</object>
|
70
|
+
<packing>
|
71
|
+
<property name="expand">False</property>
|
72
|
+
<property name="fill">True</property>
|
73
|
+
<property name="position">2</property>
|
74
|
+
</packing>
|
75
|
+
</child>
|
76
|
+
</object>
|
77
|
+
<packing>
|
78
|
+
<property name="expand">True</property>
|
79
|
+
<property name="fill">True</property>
|
80
|
+
<property name="padding">20</property>
|
81
|
+
<property name="position">1</property>
|
82
|
+
</packing>
|
83
|
+
</child>
|
84
|
+
</object>
|
85
|
+
</child>
|
86
|
+
</object>
|
87
|
+
</interface>
|
@@ -0,0 +1,61 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!-- Generated with glade 3.18.3 -->
|
3
|
+
<interface>
|
4
|
+
<requires lib="gtk+" version="3.0"/>
|
5
|
+
<object class="GtkWindow" id="window1">
|
6
|
+
<property name="can_focus">False</property>
|
7
|
+
<property name="title" translatable="yes">Modal Window</property>
|
8
|
+
<property name="modal">True</property>
|
9
|
+
<property name="window_position">center</property>
|
10
|
+
<child>
|
11
|
+
<object class="GtkBox" id="box1">
|
12
|
+
<property name="visible">True</property>
|
13
|
+
<property name="can_focus">False</property>
|
14
|
+
<property name="margin_left">20</property>
|
15
|
+
<property name="margin_right">20</property>
|
16
|
+
<property name="margin_top">20</property>
|
17
|
+
<property name="margin_bottom">20</property>
|
18
|
+
<property name="orientation">vertical</property>
|
19
|
+
<property name="spacing">20</property>
|
20
|
+
<child>
|
21
|
+
<object class="GtkLabel" id="label1">
|
22
|
+
<property name="visible">True</property>
|
23
|
+
<property name="can_focus">False</property>
|
24
|
+
<property name="label" translatable="yes">This modal window freezes the parent, and is always on top.</property>
|
25
|
+
</object>
|
26
|
+
<packing>
|
27
|
+
<property name="expand">False</property>
|
28
|
+
<property name="fill">True</property>
|
29
|
+
<property name="position">0</property>
|
30
|
+
</packing>
|
31
|
+
</child>
|
32
|
+
<child>
|
33
|
+
<object class="GtkButtonBox" id="buttonbox1">
|
34
|
+
<property name="visible">True</property>
|
35
|
+
<property name="can_focus">False</property>
|
36
|
+
<property name="orientation">vertical</property>
|
37
|
+
<property name="layout_style">start</property>
|
38
|
+
<child>
|
39
|
+
<object class="GtkButton" id="buttonOk">
|
40
|
+
<property name="label" translatable="yes">Ok</property>
|
41
|
+
<property name="visible">True</property>
|
42
|
+
<property name="can_focus">True</property>
|
43
|
+
<property name="receives_default">True</property>
|
44
|
+
</object>
|
45
|
+
<packing>
|
46
|
+
<property name="expand">False</property>
|
47
|
+
<property name="fill">True</property>
|
48
|
+
<property name="position">0</property>
|
49
|
+
</packing>
|
50
|
+
</child>
|
51
|
+
</object>
|
52
|
+
<packing>
|
53
|
+
<property name="expand">False</property>
|
54
|
+
<property name="fill">True</property>
|
55
|
+
<property name="position">1</property>
|
56
|
+
</packing>
|
57
|
+
</child>
|
58
|
+
</object>
|
59
|
+
</child>
|
60
|
+
</object>
|
61
|
+
</interface>
|
@@ -0,0 +1,61 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!-- Generated with glade 3.18.3 -->
|
3
|
+
<interface>
|
4
|
+
<requires lib="gtk+" version="3.0"/>
|
5
|
+
<object class="GtkWindow" id="window1">
|
6
|
+
<property name="can_focus">False</property>
|
7
|
+
<property name="title" translatable="yes">Modeless Window</property>
|
8
|
+
<property name="window_position">center</property>
|
9
|
+
<child>
|
10
|
+
<object class="GtkBox" id="box1">
|
11
|
+
<property name="visible">True</property>
|
12
|
+
<property name="can_focus">False</property>
|
13
|
+
<property name="margin_left">20</property>
|
14
|
+
<property name="margin_right">20</property>
|
15
|
+
<property name="margin_top">20</property>
|
16
|
+
<property name="margin_bottom">20</property>
|
17
|
+
<property name="orientation">vertical</property>
|
18
|
+
<property name="spacing">15</property>
|
19
|
+
<child>
|
20
|
+
<object class="GtkLabel" id="label1">
|
21
|
+
<property name="visible">True</property>
|
22
|
+
<property name="can_focus">False</property>
|
23
|
+
<property name="label" translatable="yes">This window operates concurrently with the parent.
|
24
|
+
Open as many as you want!</property>
|
25
|
+
</object>
|
26
|
+
<packing>
|
27
|
+
<property name="expand">True</property>
|
28
|
+
<property name="fill">True</property>
|
29
|
+
<property name="position">0</property>
|
30
|
+
</packing>
|
31
|
+
</child>
|
32
|
+
<child>
|
33
|
+
<object class="GtkButtonBox" id="buttonbox1">
|
34
|
+
<property name="visible">True</property>
|
35
|
+
<property name="can_focus">False</property>
|
36
|
+
<property name="orientation">vertical</property>
|
37
|
+
<property name="layout_style">start</property>
|
38
|
+
<child>
|
39
|
+
<object class="GtkButton" id="buttonOk">
|
40
|
+
<property name="label" translatable="yes">Ok</property>
|
41
|
+
<property name="visible">True</property>
|
42
|
+
<property name="can_focus">True</property>
|
43
|
+
<property name="receives_default">True</property>
|
44
|
+
</object>
|
45
|
+
<packing>
|
46
|
+
<property name="expand">True</property>
|
47
|
+
<property name="fill">True</property>
|
48
|
+
<property name="position">0</property>
|
49
|
+
</packing>
|
50
|
+
</child>
|
51
|
+
</object>
|
52
|
+
<packing>
|
53
|
+
<property name="expand">False</property>
|
54
|
+
<property name="fill">True</property>
|
55
|
+
<property name="position">1</property>
|
56
|
+
</packing>
|
57
|
+
</child>
|
58
|
+
</object>
|
59
|
+
</child>
|
60
|
+
</object>
|
61
|
+
</interface>
|