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 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# This demonstrates how you can easily add a GUI to any ruby class.
|
3
|
-
# The class DataObject holds all the logic for the class and
|
4
|
-
# DataObjectGUI holds all the GUI elements. This is a very good
|
5
|
-
# way to use visualruby because it keeps your code organized.
|
6
|
-
#
|
7
|
-
# Also, you can easily add a GUI to any of your existing ruby classes by
|
8
|
-
# simply making a class, MyClassGUI, that is a subclass of your existing class.
|
9
|
-
#
|
10
|
-
# In this example, I've added a button to the glade form with the name, "buttonShow.'
|
11
|
-
# The button's "clicked" signal (see 'signal' tab in glade) is set to
|
12
|
-
# "buttonShow_clicked." That means when the user clicks the button,
|
13
|
-
# the method "buttonShow_clicked" will be called in this file. You can see
|
14
|
-
# the code below.
|
15
|
-
#
|
16
|
-
# Notice that in glade, the entry fields are named:
|
17
|
-
#
|
18
|
-
# DataObjectGUI.name
|
19
|
-
# DataObjectGUI.address ...etc.
|
20
|
-
#
|
21
|
-
# This is so that set_glade_all() and get_glade_all() will be able to map them to
|
22
|
-
# the instance variables.
|
23
|
-
#
|
24
|
-
|
25
|
-
class DataObjectGUI < DataObject
|
26
|
-
|
27
|
-
include GladeGUI
|
28
|
-
|
29
|
-
def show()
|
30
|
-
load_glade(__FILE__) #loads file, glade/DataObjectGUI.glade into @builder
|
31
|
-
set_glade_all() #populates glade controls with insance variables from DataObject
|
32
|
-
show_window()
|
33
|
-
end
|
34
|
-
|
35
|
-
def buttonShow__clicked(button)
|
36
|
-
get_glade_all() #this sets the instance variables from values in the glade form.
|
37
|
-
VR::Dialog.message_box("Curent values:\n\n#{@name}\n#{@address}\n#{@email}\n#{@phone}\n")
|
38
|
-
end
|
39
|
-
|
40
|
-
end
|
41
|
-
|
@@ -1,18 +0,0 @@
|
|
1
|
-
|
2
|
-
class ListViewObjectsGUI < ListViewObjects
|
3
|
-
|
4
|
-
include GladeGUI
|
5
|
-
|
6
|
-
def before_show
|
7
|
-
@builder["scrolledwindow1"].add(self)
|
8
|
-
select_row(0) #in VR::ListView
|
9
|
-
renderer(:quote).edited_callback = method(:selection__changed)
|
10
|
-
end
|
11
|
-
|
12
|
-
def selection__changed(*args)
|
13
|
-
return unless row = selected_rows.first # iter = selection.selected
|
14
|
-
@builder["labelQuote"].label = row[:quote].text
|
15
|
-
end
|
16
|
-
|
17
|
-
end
|
18
|
-
|
@@ -1,198 +0,0 @@
|
|
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="can_focus">False</property>
|
8
|
-
<property name="title" translatable="yes">Basic Object Demo</property>
|
9
|
-
<property name="modal">True</property>
|
10
|
-
<property name="window_position">center-always</property>
|
11
|
-
<signal name="destroy" handler="destroy_window" swapped="no"/>
|
12
|
-
<child>
|
13
|
-
<object class="GtkHBox" id="hbox1">
|
14
|
-
<property name="visible">True</property>
|
15
|
-
<property name="can_focus">False</property>
|
16
|
-
<child>
|
17
|
-
<object class="GtkVBox" id="vbox1">
|
18
|
-
<property name="visible">True</property>
|
19
|
-
<property name="can_focus">False</property>
|
20
|
-
<property name="spacing">10</property>
|
21
|
-
<child>
|
22
|
-
<object class="GtkLabel" id="label5">
|
23
|
-
<property name="visible">True</property>
|
24
|
-
<property name="can_focus">False</property>
|
25
|
-
<property name="label" translatable="yes"><big><big>Basic Object Demo</big></big>
|
26
|
-
This was created with visualruby. See visualruby.net.</property>
|
27
|
-
<property name="use_markup">True</property>
|
28
|
-
</object>
|
29
|
-
<packing>
|
30
|
-
<property name="expand">True</property>
|
31
|
-
<property name="fill">True</property>
|
32
|
-
<property name="padding">10</property>
|
33
|
-
<property name="position">0</property>
|
34
|
-
</packing>
|
35
|
-
</child>
|
36
|
-
<child>
|
37
|
-
<object class="GtkTable" id="table1">
|
38
|
-
<property name="visible">True</property>
|
39
|
-
<property name="can_focus">False</property>
|
40
|
-
<property name="n_rows">4</property>
|
41
|
-
<property name="n_columns">2</property>
|
42
|
-
<property name="column_spacing">7</property>
|
43
|
-
<property name="row_spacing">10</property>
|
44
|
-
<child>
|
45
|
-
<object class="GtkLabel" id="label1">
|
46
|
-
<property name="visible">True</property>
|
47
|
-
<property name="can_focus">False</property>
|
48
|
-
<property name="xalign">1</property>
|
49
|
-
<property name="label" translatable="yes">Name:</property>
|
50
|
-
</object>
|
51
|
-
</child>
|
52
|
-
<child>
|
53
|
-
<object class="GtkLabel" id="label2">
|
54
|
-
<property name="visible">True</property>
|
55
|
-
<property name="can_focus">False</property>
|
56
|
-
<property name="xalign">1</property>
|
57
|
-
<property name="label" translatable="yes">Address:</property>
|
58
|
-
</object>
|
59
|
-
<packing>
|
60
|
-
<property name="top_attach">1</property>
|
61
|
-
<property name="bottom_attach">2</property>
|
62
|
-
</packing>
|
63
|
-
</child>
|
64
|
-
<child>
|
65
|
-
<object class="GtkLabel" id="label3">
|
66
|
-
<property name="visible">True</property>
|
67
|
-
<property name="can_focus">False</property>
|
68
|
-
<property name="xalign">1</property>
|
69
|
-
<property name="label" translatable="yes">Email:</property>
|
70
|
-
</object>
|
71
|
-
<packing>
|
72
|
-
<property name="top_attach">2</property>
|
73
|
-
<property name="bottom_attach">3</property>
|
74
|
-
</packing>
|
75
|
-
</child>
|
76
|
-
<child>
|
77
|
-
<object class="GtkLabel" id="label4">
|
78
|
-
<property name="visible">True</property>
|
79
|
-
<property name="can_focus">False</property>
|
80
|
-
<property name="xalign">1</property>
|
81
|
-
<property name="label" translatable="yes">Phone</property>
|
82
|
-
</object>
|
83
|
-
<packing>
|
84
|
-
<property name="top_attach">3</property>
|
85
|
-
<property name="bottom_attach">4</property>
|
86
|
-
</packing>
|
87
|
-
</child>
|
88
|
-
<child>
|
89
|
-
<object class="GtkEntry" id="name">
|
90
|
-
<property name="visible">True</property>
|
91
|
-
<property name="can_focus">True</property>
|
92
|
-
<property name="invisible_char">•</property>
|
93
|
-
<property name="primary_icon_activatable">False</property>
|
94
|
-
<property name="secondary_icon_activatable">False</property>
|
95
|
-
<property name="primary_icon_sensitive">True</property>
|
96
|
-
<property name="secondary_icon_sensitive">True</property>
|
97
|
-
</object>
|
98
|
-
<packing>
|
99
|
-
<property name="left_attach">1</property>
|
100
|
-
<property name="right_attach">2</property>
|
101
|
-
</packing>
|
102
|
-
</child>
|
103
|
-
<child>
|
104
|
-
<object class="GtkEntry" id="address">
|
105
|
-
<property name="visible">True</property>
|
106
|
-
<property name="can_focus">True</property>
|
107
|
-
<property name="invisible_char">•</property>
|
108
|
-
<property name="primary_icon_activatable">False</property>
|
109
|
-
<property name="secondary_icon_activatable">False</property>
|
110
|
-
<property name="primary_icon_sensitive">True</property>
|
111
|
-
<property name="secondary_icon_sensitive">True</property>
|
112
|
-
</object>
|
113
|
-
<packing>
|
114
|
-
<property name="left_attach">1</property>
|
115
|
-
<property name="right_attach">2</property>
|
116
|
-
<property name="top_attach">1</property>
|
117
|
-
<property name="bottom_attach">2</property>
|
118
|
-
</packing>
|
119
|
-
</child>
|
120
|
-
<child>
|
121
|
-
<object class="GtkEntry" id="email">
|
122
|
-
<property name="visible">True</property>
|
123
|
-
<property name="can_focus">True</property>
|
124
|
-
<property name="invisible_char">•</property>
|
125
|
-
<property name="primary_icon_activatable">False</property>
|
126
|
-
<property name="secondary_icon_activatable">False</property>
|
127
|
-
<property name="primary_icon_sensitive">True</property>
|
128
|
-
<property name="secondary_icon_sensitive">True</property>
|
129
|
-
</object>
|
130
|
-
<packing>
|
131
|
-
<property name="left_attach">1</property>
|
132
|
-
<property name="right_attach">2</property>
|
133
|
-
<property name="top_attach">2</property>
|
134
|
-
<property name="bottom_attach">3</property>
|
135
|
-
</packing>
|
136
|
-
</child>
|
137
|
-
<child>
|
138
|
-
<object class="GtkEntry" id="phone">
|
139
|
-
<property name="visible">True</property>
|
140
|
-
<property name="can_focus">True</property>
|
141
|
-
<property name="invisible_char">•</property>
|
142
|
-
<property name="primary_icon_activatable">False</property>
|
143
|
-
<property name="secondary_icon_activatable">False</property>
|
144
|
-
<property name="primary_icon_sensitive">True</property>
|
145
|
-
<property name="secondary_icon_sensitive">True</property>
|
146
|
-
</object>
|
147
|
-
<packing>
|
148
|
-
<property name="left_attach">1</property>
|
149
|
-
<property name="right_attach">2</property>
|
150
|
-
<property name="top_attach">3</property>
|
151
|
-
<property name="bottom_attach">4</property>
|
152
|
-
</packing>
|
153
|
-
</child>
|
154
|
-
</object>
|
155
|
-
<packing>
|
156
|
-
<property name="expand">True</property>
|
157
|
-
<property name="fill">True</property>
|
158
|
-
<property name="position">1</property>
|
159
|
-
</packing>
|
160
|
-
</child>
|
161
|
-
<child>
|
162
|
-
<object class="GtkHButtonBox" id="hbuttonbox1">
|
163
|
-
<property name="visible">True</property>
|
164
|
-
<property name="can_focus">False</property>
|
165
|
-
<child>
|
166
|
-
<object class="GtkButton" id="buttonSave">
|
167
|
-
<property name="label" translatable="yes">Save</property>
|
168
|
-
<property name="visible">True</property>
|
169
|
-
<property name="can_focus">True</property>
|
170
|
-
<property name="receives_default">True</property>
|
171
|
-
<property name="use_action_appearance">False</property>
|
172
|
-
</object>
|
173
|
-
<packing>
|
174
|
-
<property name="expand">False</property>
|
175
|
-
<property name="fill">False</property>
|
176
|
-
<property name="position">0</property>
|
177
|
-
</packing>
|
178
|
-
</child>
|
179
|
-
</object>
|
180
|
-
<packing>
|
181
|
-
<property name="expand">True</property>
|
182
|
-
<property name="fill">True</property>
|
183
|
-
<property name="padding">10</property>
|
184
|
-
<property name="position">2</property>
|
185
|
-
</packing>
|
186
|
-
</child>
|
187
|
-
</object>
|
188
|
-
<packing>
|
189
|
-
<property name="expand">True</property>
|
190
|
-
<property name="fill">True</property>
|
191
|
-
<property name="padding">15</property>
|
192
|
-
<property name="position">0</property>
|
193
|
-
</packing>
|
194
|
-
</child>
|
195
|
-
</object>
|
196
|
-
</child>
|
197
|
-
</object>
|
198
|
-
</interface>
|
@@ -1,102 +0,0 @@
|
|
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="can_focus">False</property>
|
8
|
-
<property name="title" translatable="yes">ListView Objects</property>
|
9
|
-
<property name="modal">True</property>
|
10
|
-
<property name="default_width">700</property>
|
11
|
-
<property name="default_height">460</property>
|
12
|
-
<signal name="destroy" handler="destroy_window" swapped="no"/>
|
13
|
-
<child>
|
14
|
-
<object class="GtkHBox" id="hbox1">
|
15
|
-
<property name="visible">True</property>
|
16
|
-
<property name="can_focus">False</property>
|
17
|
-
<child>
|
18
|
-
<object class="GtkVBox" id="vbox1">
|
19
|
-
<property name="visible">True</property>
|
20
|
-
<property name="can_focus">False</property>
|
21
|
-
<child>
|
22
|
-
<object class="GtkLabel" id="label2">
|
23
|
-
<property name="visible">True</property>
|
24
|
-
<property name="can_focus">False</property>
|
25
|
-
<property name="label" translatable="yes"><big><big><big>ListView Objects</big></big></big>
|
26
|
-
Try double-clicking on each field to edit an object. Also, try entering invalid email addresses.</property>
|
27
|
-
<property name="use_markup">True</property>
|
28
|
-
</object>
|
29
|
-
<packing>
|
30
|
-
<property name="expand">True</property>
|
31
|
-
<property name="fill">True</property>
|
32
|
-
<property name="position">0</property>
|
33
|
-
</packing>
|
34
|
-
</child>
|
35
|
-
<child>
|
36
|
-
<object class="GtkScrolledWindow" id="scrolledwindow1">
|
37
|
-
<property name="visible">True</property>
|
38
|
-
<property name="can_focus">True</property>
|
39
|
-
<property name="hscrollbar_policy">automatic</property>
|
40
|
-
<property name="vscrollbar_policy">automatic</property>
|
41
|
-
<child>
|
42
|
-
<placeholder/>
|
43
|
-
</child>
|
44
|
-
</object>
|
45
|
-
<packing>
|
46
|
-
<property name="expand">True</property>
|
47
|
-
<property name="fill">True</property>
|
48
|
-
<property name="padding">15</property>
|
49
|
-
<property name="position">1</property>
|
50
|
-
</packing>
|
51
|
-
</child>
|
52
|
-
<child>
|
53
|
-
<object class="GtkFrame" id="frame1">
|
54
|
-
<property name="height_request">120</property>
|
55
|
-
<property name="visible">True</property>
|
56
|
-
<property name="can_focus">False</property>
|
57
|
-
<property name="label_xalign">0</property>
|
58
|
-
<property name="shadow_type">in</property>
|
59
|
-
<child>
|
60
|
-
<object class="GtkAlignment" id="alignment1">
|
61
|
-
<property name="visible">True</property>
|
62
|
-
<property name="can_focus">False</property>
|
63
|
-
<property name="left_padding">12</property>
|
64
|
-
<child>
|
65
|
-
<object class="GtkLabel" id="labelQuote">
|
66
|
-
<property name="width_request">600</property>
|
67
|
-
<property name="visible">True</property>
|
68
|
-
<property name="can_focus">False</property>
|
69
|
-
<property name="label" translatable="yes">label</property>
|
70
|
-
<property name="wrap">True</property>
|
71
|
-
</object>
|
72
|
-
</child>
|
73
|
-
</object>
|
74
|
-
</child>
|
75
|
-
<child type="label">
|
76
|
-
<object class="GtkLabel" id="labelQ">
|
77
|
-
<property name="visible">True</property>
|
78
|
-
<property name="can_focus">False</property>
|
79
|
-
<property name="label" translatable="yes"><b>Quote</b></property>
|
80
|
-
<property name="use_markup">True</property>
|
81
|
-
</object>
|
82
|
-
</child>
|
83
|
-
</object>
|
84
|
-
<packing>
|
85
|
-
<property name="expand">False</property>
|
86
|
-
<property name="fill">False</property>
|
87
|
-
<property name="padding">14</property>
|
88
|
-
<property name="position">2</property>
|
89
|
-
</packing>
|
90
|
-
</child>
|
91
|
-
</object>
|
92
|
-
<packing>
|
93
|
-
<property name="expand">True</property>
|
94
|
-
<property name="fill">True</property>
|
95
|
-
<property name="padding">15</property>
|
96
|
-
<property name="position">0</property>
|
97
|
-
</packing>
|
98
|
-
</child>
|
99
|
-
</object>
|
100
|
-
</child>
|
101
|
-
</object>
|
102
|
-
</interface>
|
@@ -1,13 +0,0 @@
|
|
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
|
-
|
13
|
-
ListViewObjectsGUI.new.show
|
@@ -1,16 +0,0 @@
|
|
1
|
-
--- !ruby/object:VR_ENV
|
2
|
-
current_file: /home/eric/vrp/vrx/visualruby_examples/simple_ruby_gui/bin/DataObjectGUI.rb
|
3
|
-
height: 613
|
4
|
-
open_files:
|
5
|
-
- /home/eric/vrp/vrx/visualruby_examples/simple_ruby_gui/main.rb
|
6
|
-
- /home/eric/vrp/vrx/visualruby_examples/simple_ruby_gui/bin/DataObjectGUI.rb
|
7
|
-
open_folders:
|
8
|
-
- /home/eric/vrp/vrx/visualruby_examples/simple_ruby_gui
|
9
|
-
- /home/eric/vrp/vrx/visualruby_examples/simple_ruby_gui/bin
|
10
|
-
- /home/eric/vrp/vrx/visualruby_examples/simple_ruby_gui/bin/glade
|
11
|
-
panel_pos: 360
|
12
|
-
rdoc_command_line: rdoc -x README
|
13
|
-
run_command_line: ruby main.rb
|
14
|
-
width: 1411
|
15
|
-
settings_file_version: 1
|
16
|
-
builder: !ruby/object:Gtk::Builder {}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
|
2
|
-
class DataObjectGUI
|
3
|
-
|
4
|
-
include GladeGUI
|
5
|
-
|
6
|
-
|
7
|
-
def initialize(name, address, phone, email)
|
8
|
-
@name = name
|
9
|
-
@address = address
|
10
|
-
@phone = phone
|
11
|
-
@email = email
|
12
|
-
end
|
13
|
-
|
14
|
-
def buttonShow__clicked(button)
|
15
|
-
get_glade_variables()
|
16
|
-
VR::msg "Curent values:\n\n#{@name}\n#{@address}\n#{@email}\n#{@phone}\n"
|
17
|
-
end
|
18
|
-
|
19
|
-
end
|
20
|
-
|
@@ -1,163 +0,0 @@
|
|
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">Basic Object Demo</property>
|
8
|
-
<property name="modal">True</property>
|
9
|
-
<property name="window_position">center-always</property>
|
10
|
-
<signal name="destroy" handler="destroy_window"/>
|
11
|
-
<child>
|
12
|
-
<object class="GtkHBox" id="hbox1">
|
13
|
-
<property name="visible">True</property>
|
14
|
-
<child>
|
15
|
-
<object class="GtkVBox" id="vbox1">
|
16
|
-
<property name="visible">True</property>
|
17
|
-
<property name="spacing">10</property>
|
18
|
-
<child>
|
19
|
-
<object class="GtkLabel" id="label5">
|
20
|
-
<property name="visible">True</property>
|
21
|
-
<property name="label" translatable="yes"><big><big>Basic Object Demo</big></big>
|
22
|
-
This was created with visualruby. See visualruby.net.</property>
|
23
|
-
<property name="use_markup">True</property>
|
24
|
-
</object>
|
25
|
-
<packing>
|
26
|
-
<property name="padding">10</property>
|
27
|
-
<property name="position">0</property>
|
28
|
-
</packing>
|
29
|
-
</child>
|
30
|
-
<child>
|
31
|
-
<object class="GtkTable" id="table1">
|
32
|
-
<property name="visible">True</property>
|
33
|
-
<property name="n_rows">4</property>
|
34
|
-
<property name="n_columns">2</property>
|
35
|
-
<property name="column_spacing">7</property>
|
36
|
-
<property name="row_spacing">10</property>
|
37
|
-
<child>
|
38
|
-
<object class="GtkLabel" id="label1">
|
39
|
-
<property name="visible">True</property>
|
40
|
-
<property name="xalign">1</property>
|
41
|
-
<property name="label" translatable="yes">Name:</property>
|
42
|
-
</object>
|
43
|
-
</child>
|
44
|
-
<child>
|
45
|
-
<object class="GtkLabel" id="label2">
|
46
|
-
<property name="visible">True</property>
|
47
|
-
<property name="xalign">1</property>
|
48
|
-
<property name="label" translatable="yes">Address:</property>
|
49
|
-
</object>
|
50
|
-
<packing>
|
51
|
-
<property name="top_attach">1</property>
|
52
|
-
<property name="bottom_attach">2</property>
|
53
|
-
</packing>
|
54
|
-
</child>
|
55
|
-
<child>
|
56
|
-
<object class="GtkLabel" id="label3">
|
57
|
-
<property name="visible">True</property>
|
58
|
-
<property name="xalign">1</property>
|
59
|
-
<property name="label" translatable="yes">Email:</property>
|
60
|
-
</object>
|
61
|
-
<packing>
|
62
|
-
<property name="top_attach">2</property>
|
63
|
-
<property name="bottom_attach">3</property>
|
64
|
-
</packing>
|
65
|
-
</child>
|
66
|
-
<child>
|
67
|
-
<object class="GtkLabel" id="label4">
|
68
|
-
<property name="visible">True</property>
|
69
|
-
<property name="xalign">1</property>
|
70
|
-
<property name="label" translatable="yes">Phone</property>
|
71
|
-
</object>
|
72
|
-
<packing>
|
73
|
-
<property name="top_attach">3</property>
|
74
|
-
<property name="bottom_attach">4</property>
|
75
|
-
</packing>
|
76
|
-
</child>
|
77
|
-
<child>
|
78
|
-
<object class="GtkEntry" id="DataObjectGUI.name">
|
79
|
-
<property name="visible">True</property>
|
80
|
-
<property name="can_focus">True</property>
|
81
|
-
<property name="invisible_char">•</property>
|
82
|
-
</object>
|
83
|
-
<packing>
|
84
|
-
<property name="left_attach">1</property>
|
85
|
-
<property name="right_attach">2</property>
|
86
|
-
</packing>
|
87
|
-
</child>
|
88
|
-
<child>
|
89
|
-
<object class="GtkEntry" id="DataObjectGUI.address">
|
90
|
-
<property name="visible">True</property>
|
91
|
-
<property name="can_focus">True</property>
|
92
|
-
<property name="invisible_char">•</property>
|
93
|
-
</object>
|
94
|
-
<packing>
|
95
|
-
<property name="left_attach">1</property>
|
96
|
-
<property name="right_attach">2</property>
|
97
|
-
<property name="top_attach">1</property>
|
98
|
-
<property name="bottom_attach">2</property>
|
99
|
-
</packing>
|
100
|
-
</child>
|
101
|
-
<child>
|
102
|
-
<object class="GtkEntry" id="DataObjectGUI.email">
|
103
|
-
<property name="visible">True</property>
|
104
|
-
<property name="can_focus">True</property>
|
105
|
-
<property name="invisible_char">•</property>
|
106
|
-
</object>
|
107
|
-
<packing>
|
108
|
-
<property name="left_attach">1</property>
|
109
|
-
<property name="right_attach">2</property>
|
110
|
-
<property name="top_attach">2</property>
|
111
|
-
<property name="bottom_attach">3</property>
|
112
|
-
</packing>
|
113
|
-
</child>
|
114
|
-
<child>
|
115
|
-
<object class="GtkEntry" id="DataObjectGUI.phone">
|
116
|
-
<property name="visible">True</property>
|
117
|
-
<property name="can_focus">True</property>
|
118
|
-
<property name="invisible_char">•</property>
|
119
|
-
</object>
|
120
|
-
<packing>
|
121
|
-
<property name="left_attach">1</property>
|
122
|
-
<property name="right_attach">2</property>
|
123
|
-
<property name="top_attach">3</property>
|
124
|
-
<property name="bottom_attach">4</property>
|
125
|
-
</packing>
|
126
|
-
</child>
|
127
|
-
</object>
|
128
|
-
<packing>
|
129
|
-
<property name="position">1</property>
|
130
|
-
</packing>
|
131
|
-
</child>
|
132
|
-
<child>
|
133
|
-
<object class="GtkHButtonBox" id="hbuttonbox1">
|
134
|
-
<property name="visible">True</property>
|
135
|
-
<child>
|
136
|
-
<object class="GtkButton" id="buttonShow">
|
137
|
-
<property name="label" translatable="yes">Show</property>
|
138
|
-
<property name="visible">True</property>
|
139
|
-
<property name="can_focus">True</property>
|
140
|
-
<property name="receives_default">True</property>
|
141
|
-
</object>
|
142
|
-
<packing>
|
143
|
-
<property name="expand">False</property>
|
144
|
-
<property name="fill">False</property>
|
145
|
-
<property name="position">0</property>
|
146
|
-
</packing>
|
147
|
-
</child>
|
148
|
-
</object>
|
149
|
-
<packing>
|
150
|
-
<property name="padding">10</property>
|
151
|
-
<property name="position">2</property>
|
152
|
-
</packing>
|
153
|
-
</child>
|
154
|
-
</object>
|
155
|
-
<packing>
|
156
|
-
<property name="padding">15</property>
|
157
|
-
<property name="position">0</property>
|
158
|
-
</packing>
|
159
|
-
</child>
|
160
|
-
</object>
|
161
|
-
</child>
|
162
|
-
</object>
|
163
|
-
</interface>
|
@@ -1,16 +0,0 @@
|
|
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
|
-
|
13
|
-
x = DataObjectGUI.new("Harvey Milktoast", "123 Main, Hemet, CA 90090", "harvey@harveyserver.com", "132-243-4323")
|
14
|
-
x.show
|
15
|
-
|
16
|
-
|
@@ -1,12 +0,0 @@
|
|
1
|
-
--- !ruby/object:VR_ENV
|
2
|
-
current_file: /home/eric/vrp/vrx/Untitled
|
3
|
-
height: 600
|
4
|
-
open_files:
|
5
|
-
- /home/eric/vrp/vrx/Untitled
|
6
|
-
open_folders:
|
7
|
-
- /home/eric/vrp/vrx/visualruby_examples/treeview
|
8
|
-
panel_pos: 360
|
9
|
-
rdoc_command_line: rdoc -x README
|
10
|
-
run_command_line: ruby main.rb
|
11
|
-
width: 800
|
12
|
-
settings_file_version: 1
|