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,40 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# This shows how to make child windows that close when
|
3
|
-
# their parent window closes.
|
4
|
-
#
|
5
|
-
# Passing a reference to the parent to the new() method solves all the
|
6
|
-
# complications of running the child and parent simultaniously.
|
7
|
-
#
|
8
|
-
# The passing the parent to the new() constructor does three things:
|
9
|
-
#
|
10
|
-
# 1) It registers the parent window (using win.transient_for=parent )
|
11
|
-
# 2) It causes show() to run the child in the main window's
|
12
|
-
# Gtk.main loop, instead of starting its own loop.
|
13
|
-
# 3) It causes destroy_window() to destroy only the child without
|
14
|
-
# calling Gtk.main.quit, so the main program's loop continues after
|
15
|
-
# the child is destroyed.
|
16
|
-
#
|
17
|
-
# So, just pass a reference to the parent to load_glade for all child windows,
|
18
|
-
# and everyting will be done automatically:
|
19
|
-
#
|
20
|
-
class MyChildClass
|
21
|
-
|
22
|
-
include GladeGUI
|
23
|
-
|
24
|
-
def before_show()
|
25
|
-
if get_parent()
|
26
|
-
@builder["label1"].label = "NON-MODAL WINDOW\n This window doesn't interfere with the operation of the rest of the program.\nTherefore you can open more of these windows if you like.\nIf you close the parent, I will close too."
|
27
|
-
@builder["window1"].title = "Non-Modal Window"
|
28
|
-
else
|
29
|
-
@builder["label1"].label = "MODAL WINDOW\nThis window freezes the parent program until it is closed.\nTherefore you can't open any more windows, or close the\n parent window until you close this window."
|
30
|
-
@builder["window1"].title = "Modal Window"
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
# When cancel clicked in MyChildClass.glade
|
35
|
-
def buttonCancel__clicked(*argv)
|
36
|
-
destroy_window()
|
37
|
-
end
|
38
|
-
|
39
|
-
end
|
40
|
-
|
@@ -1,101 +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="window_position">center-always</property>
|
9
|
-
<signal name="destroy" handler="destroy_window" swapped="no"/>
|
10
|
-
<child>
|
11
|
-
<object class="GtkHBox" id="hbox1">
|
12
|
-
<property name="visible">True</property>
|
13
|
-
<property name="can_focus">False</property>
|
14
|
-
<child>
|
15
|
-
<object class="GtkVBox" id="vbox1">
|
16
|
-
<property name="visible">True</property>
|
17
|
-
<property name="can_focus">False</property>
|
18
|
-
<child>
|
19
|
-
<object class="GtkLabel" id="label1">
|
20
|
-
<property name="visible">True</property>
|
21
|
-
<property name="can_focus">False</property>
|
22
|
-
<property name="xpad">10</property>
|
23
|
-
<property name="ypad">10</property>
|
24
|
-
<property name="label" translatable="yes">Open as many child windows as you want.
|
25
|
-
You can switch between windows because they're not modal.
|
26
|
-
Then click the close button, to close everything.</property>
|
27
|
-
</object>
|
28
|
-
<packing>
|
29
|
-
<property name="expand">True</property>
|
30
|
-
<property name="fill">True</property>
|
31
|
-
<property name="padding">10</property>
|
32
|
-
<property name="position">0</property>
|
33
|
-
</packing>
|
34
|
-
</child>
|
35
|
-
<child>
|
36
|
-
<object class="GtkHButtonBox" id="hbuttonbox1">
|
37
|
-
<property name="visible">True</property>
|
38
|
-
<property name="can_focus">False</property>
|
39
|
-
<property name="spacing">10</property>
|
40
|
-
<child>
|
41
|
-
<object class="GtkButton" id="buttonOpenChild">
|
42
|
-
<property name="label" translatable="yes">Open Non-Modal Window</property>
|
43
|
-
<property name="visible">True</property>
|
44
|
-
<property name="can_focus">True</property>
|
45
|
-
<property name="receives_default">True</property>
|
46
|
-
<property name="use_action_appearance">False</property>
|
47
|
-
</object>
|
48
|
-
<packing>
|
49
|
-
<property name="expand">False</property>
|
50
|
-
<property name="fill">False</property>
|
51
|
-
<property name="position">0</property>
|
52
|
-
</packing>
|
53
|
-
</child>
|
54
|
-
<child>
|
55
|
-
<object class="GtkButton" id="modalButton">
|
56
|
-
<property name="label" translatable="yes">Open Modal Window</property>
|
57
|
-
<property name="visible">True</property>
|
58
|
-
<property name="can_focus">True</property>
|
59
|
-
<property name="receives_default">True</property>
|
60
|
-
<property name="use_action_appearance">False</property>
|
61
|
-
</object>
|
62
|
-
<packing>
|
63
|
-
<property name="expand">False</property>
|
64
|
-
<property name="fill">False</property>
|
65
|
-
<property name="position">1</property>
|
66
|
-
</packing>
|
67
|
-
</child>
|
68
|
-
<child>
|
69
|
-
<object class="GtkButton" id="cancelButton">
|
70
|
-
<property name="label" translatable="yes">Cancel</property>
|
71
|
-
<property name="visible">True</property>
|
72
|
-
<property name="can_focus">True</property>
|
73
|
-
<property name="receives_default">True</property>
|
74
|
-
<property name="use_action_appearance">False</property>
|
75
|
-
</object>
|
76
|
-
<packing>
|
77
|
-
<property name="expand">False</property>
|
78
|
-
<property name="fill">False</property>
|
79
|
-
<property name="position">2</property>
|
80
|
-
</packing>
|
81
|
-
</child>
|
82
|
-
</object>
|
83
|
-
<packing>
|
84
|
-
<property name="expand">True</property>
|
85
|
-
<property name="fill">True</property>
|
86
|
-
<property name="padding">10</property>
|
87
|
-
<property name="position">1</property>
|
88
|
-
</packing>
|
89
|
-
</child>
|
90
|
-
</object>
|
91
|
-
<packing>
|
92
|
-
<property name="expand">True</property>
|
93
|
-
<property name="fill">True</property>
|
94
|
-
<property name="padding">20</property>
|
95
|
-
<property name="position">0</property>
|
96
|
-
</packing>
|
97
|
-
</child>
|
98
|
-
</object>
|
99
|
-
</child>
|
100
|
-
</object>
|
101
|
-
</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
|
-
my_path = File.expand_path(File.dirname(__FILE__))
|
10
|
-
require_all Dir.glob(my_path + "/bin/**/*.rb")
|
11
|
-
|
12
|
-
ChildWindowDemo.new.show
|
13
|
-
|
@@ -1,12 +0,0 @@
|
|
1
|
-
--- !ruby/object:VR_ENV
|
2
|
-
current_file: /home/eric/vrp/vrx/visualruby_examples/listview/Untitled
|
3
|
-
height: 600
|
4
|
-
open_files:
|
5
|
-
- /home/eric/vrp/vrx/visualruby_examples/listview/Untitled
|
6
|
-
open_folders:
|
7
|
-
- /home/eric/vrp/vrx/visualruby_examples/drag_drop
|
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
|
@@ -1,143 +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="width_request">800</property>
|
7
|
-
<property name="height_request">400</property>
|
8
|
-
<property name="visible">True</property>
|
9
|
-
<property name="title" translatable="yes">Drag N Drop -- Visualruby</property>
|
10
|
-
<property name="modal">True</property>
|
11
|
-
<property name="window_position">center-always</property>
|
12
|
-
<signal name="destroy" handler="destroy_window"/>
|
13
|
-
<child>
|
14
|
-
<object class="GtkVBox" id="vbox1">
|
15
|
-
<property name="visible">True</property>
|
16
|
-
<child>
|
17
|
-
<object class="GtkHBox" id="hbox2">
|
18
|
-
<property name="visible">True</property>
|
19
|
-
<child>
|
20
|
-
<object class="GtkVBox" id="vbox2">
|
21
|
-
<property name="visible">True</property>
|
22
|
-
<property name="spacing">10</property>
|
23
|
-
<child>
|
24
|
-
<object class="GtkFrame" id="frame1">
|
25
|
-
<property name="width_request">520</property>
|
26
|
-
<property name="visible">True</property>
|
27
|
-
<property name="label_xalign">0</property>
|
28
|
-
<property name="shadow_type">in</property>
|
29
|
-
<child>
|
30
|
-
<object class="GtkAlignment" id="alignment1">
|
31
|
-
<property name="visible">True</property>
|
32
|
-
<property name="top_padding">12</property>
|
33
|
-
<property name="bottom_padding">13</property>
|
34
|
-
<property name="left_padding">13</property>
|
35
|
-
<property name="right_padding">13</property>
|
36
|
-
<child>
|
37
|
-
<object class="GtkLabel" id="label2">
|
38
|
-
<property name="width_request">600</property>
|
39
|
-
<property name="visible">True</property>
|
40
|
-
<property name="xalign">0</property>
|
41
|
-
<property name="yalign">0</property>
|
42
|
-
<property name="label" translatable="yes">With visualruby, you can drag-n-drop any widget onto another widget. Try dragging files or the button onto the textview in the middle of the screen. Also, try dragging between the textview and the button.</property>
|
43
|
-
<property name="wrap">True</property>
|
44
|
-
</object>
|
45
|
-
</child>
|
46
|
-
</object>
|
47
|
-
</child>
|
48
|
-
<child type="label">
|
49
|
-
<object class="GtkLabel" id="label1">
|
50
|
-
<property name="visible">True</property>
|
51
|
-
<property name="label" translatable="yes"><b>Instructions</b></property>
|
52
|
-
<property name="use_markup">True</property>
|
53
|
-
</object>
|
54
|
-
</child>
|
55
|
-
</object>
|
56
|
-
<packing>
|
57
|
-
<property name="expand">False</property>
|
58
|
-
<property name="fill">False</property>
|
59
|
-
<property name="padding">5</property>
|
60
|
-
<property name="position">0</property>
|
61
|
-
</packing>
|
62
|
-
</child>
|
63
|
-
<child>
|
64
|
-
<object class="GtkHBox" id="hbox3">
|
65
|
-
<property name="visible">True</property>
|
66
|
-
<property name="spacing">10</property>
|
67
|
-
<child>
|
68
|
-
<object class="GtkScrolledWindow" id="scrolledwindow1">
|
69
|
-
<property name="visible">True</property>
|
70
|
-
<property name="can_focus">True</property>
|
71
|
-
<property name="hscrollbar_policy">automatic</property>
|
72
|
-
<property name="vscrollbar_policy">automatic</property>
|
73
|
-
<child>
|
74
|
-
<placeholder/>
|
75
|
-
</child>
|
76
|
-
</object>
|
77
|
-
<packing>
|
78
|
-
<property name="position">0</property>
|
79
|
-
</packing>
|
80
|
-
</child>
|
81
|
-
<child>
|
82
|
-
<object class="GtkScrolledWindow" id="scrolledwindow2">
|
83
|
-
<property name="visible">True</property>
|
84
|
-
<property name="can_focus">True</property>
|
85
|
-
<property name="hscrollbar_policy">automatic</property>
|
86
|
-
<property name="vscrollbar_policy">automatic</property>
|
87
|
-
<child>
|
88
|
-
<object class="GtkTextView" id="textview1">
|
89
|
-
<property name="visible">True</property>
|
90
|
-
<property name="can_focus">True</property>
|
91
|
-
</object>
|
92
|
-
</child>
|
93
|
-
</object>
|
94
|
-
<packing>
|
95
|
-
<property name="position">1</property>
|
96
|
-
</packing>
|
97
|
-
</child>
|
98
|
-
<child>
|
99
|
-
<object class="GtkVButtonBox" id="vbuttonbox1">
|
100
|
-
<property name="visible">True</property>
|
101
|
-
<property name="spacing">3</property>
|
102
|
-
<property name="layout_style">end</property>
|
103
|
-
<child>
|
104
|
-
<object class="GtkButton" id="button1">
|
105
|
-
<property name="label" translatable="yes">button1</property>
|
106
|
-
<property name="visible">True</property>
|
107
|
-
<property name="can_focus">True</property>
|
108
|
-
<property name="receives_default">True</property>
|
109
|
-
</object>
|
110
|
-
<packing>
|
111
|
-
<property name="expand">False</property>
|
112
|
-
<property name="fill">False</property>
|
113
|
-
<property name="position">0</property>
|
114
|
-
</packing>
|
115
|
-
</child>
|
116
|
-
</object>
|
117
|
-
<packing>
|
118
|
-
<property name="expand">False</property>
|
119
|
-
<property name="padding">10</property>
|
120
|
-
<property name="position">2</property>
|
121
|
-
</packing>
|
122
|
-
</child>
|
123
|
-
</object>
|
124
|
-
<packing>
|
125
|
-
<property name="position">1</property>
|
126
|
-
</packing>
|
127
|
-
</child>
|
128
|
-
</object>
|
129
|
-
<packing>
|
130
|
-
<property name="padding">15</property>
|
131
|
-
<property name="position">0</property>
|
132
|
-
</packing>
|
133
|
-
</child>
|
134
|
-
</object>
|
135
|
-
<packing>
|
136
|
-
<property name="padding">15</property>
|
137
|
-
<property name="position">0</property>
|
138
|
-
</packing>
|
139
|
-
</child>
|
140
|
-
</object>
|
141
|
-
</child>
|
142
|
-
</object>
|
143
|
-
</interface>
|
@@ -1,14 +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
|
-
DragDropDemo.new.show
|
14
|
-
|
@@ -1,12 +0,0 @@
|
|
1
|
-
--- !ruby/object:VR_ENV
|
2
|
-
current_file: /home/eric/vrp/vrx/visualruby_examples/listview_objects/Untitled
|
3
|
-
height: 600
|
4
|
-
open_files:
|
5
|
-
- /home/eric/vrp/vrx/visualruby_examples/listview_objects/Untitled
|
6
|
-
open_folders:
|
7
|
-
- /home/eric/vrp/vrx/visualruby_examples/listview
|
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
|
@@ -1,220 +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">VR_ListView Demo</property>
|
9
|
-
<property name="default_width">840</property>
|
10
|
-
<property name="default_height">530</property>
|
11
|
-
<property name="type_hint">dialog</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="GtkHBox" id="hbox2">
|
23
|
-
<property name="visible">True</property>
|
24
|
-
<property name="can_focus">False</property>
|
25
|
-
<child>
|
26
|
-
<object class="GtkLabel" id="label1">
|
27
|
-
<property name="width_request">680</property>
|
28
|
-
<property name="visible">True</property>
|
29
|
-
<property name="can_focus">False</property>
|
30
|
-
<property name="label" translatable="yes"><b><big><big><big>ListView Demo</big></big></big></b>
|
31
|
-
|
32
|
-
<b>This was created with visualruby. Go to visualruby.net for more info.</b>
|
33
|
-
|
34
|
-
Try Double clicking a row. You can edit the cells by double-clicking on them. You can click on the column titles to sort. You can make the headers wider by dragging the edges with your mouse. The artists' names can be sorted in last name order. Also, notice that the music icon and the song title share the same column. When editing is turned off, you can select a row by double-clicking on it.</property>
|
35
|
-
<property name="use_markup">True</property>
|
36
|
-
<property name="wrap">True</property>
|
37
|
-
</object>
|
38
|
-
<packing>
|
39
|
-
<property name="expand">False</property>
|
40
|
-
<property name="fill">False</property>
|
41
|
-
<property name="position">0</property>
|
42
|
-
</packing>
|
43
|
-
</child>
|
44
|
-
</object>
|
45
|
-
<packing>
|
46
|
-
<property name="expand">False</property>
|
47
|
-
<property name="fill">False</property>
|
48
|
-
<property name="padding">10</property>
|
49
|
-
<property name="position">0</property>
|
50
|
-
</packing>
|
51
|
-
</child>
|
52
|
-
<child>
|
53
|
-
<object class="GtkHBox" id="hbox3">
|
54
|
-
<property name="visible">True</property>
|
55
|
-
<property name="can_focus">False</property>
|
56
|
-
<child>
|
57
|
-
<object class="GtkScrolledWindow" id="scrolledwindow1">
|
58
|
-
<property name="visible">True</property>
|
59
|
-
<property name="can_focus">True</property>
|
60
|
-
<property name="hscrollbar_policy">automatic</property>
|
61
|
-
<property name="vscrollbar_policy">automatic</property>
|
62
|
-
<child>
|
63
|
-
<placeholder/>
|
64
|
-
</child>
|
65
|
-
</object>
|
66
|
-
<packing>
|
67
|
-
<property name="expand">True</property>
|
68
|
-
<property name="fill">True</property>
|
69
|
-
<property name="position">0</property>
|
70
|
-
</packing>
|
71
|
-
</child>
|
72
|
-
</object>
|
73
|
-
<packing>
|
74
|
-
<property name="expand">True</property>
|
75
|
-
<property name="fill">True</property>
|
76
|
-
<property name="padding">20</property>
|
77
|
-
<property name="position">1</property>
|
78
|
-
</packing>
|
79
|
-
</child>
|
80
|
-
<child>
|
81
|
-
<object class="GtkTable" id="table1">
|
82
|
-
<property name="visible">True</property>
|
83
|
-
<property name="can_focus">False</property>
|
84
|
-
<property name="n_rows">4</property>
|
85
|
-
<property name="n_columns">2</property>
|
86
|
-
<child>
|
87
|
-
<object class="GtkCheckButton" id="invisible">
|
88
|
-
<property name="label" translatable="yes">Make First & Last Name Invisible</property>
|
89
|
-
<property name="visible">True</property>
|
90
|
-
<property name="can_focus">True</property>
|
91
|
-
<property name="receives_default">False</property>
|
92
|
-
<property name="use_action_appearance">False</property>
|
93
|
-
<property name="draw_indicator">True</property>
|
94
|
-
</object>
|
95
|
-
<packing>
|
96
|
-
<property name="top_attach">2</property>
|
97
|
-
<property name="bottom_attach">3</property>
|
98
|
-
</packing>
|
99
|
-
</child>
|
100
|
-
<child>
|
101
|
-
<object class="GtkCheckButton" id="xalign">
|
102
|
-
<property name="label" translatable="yes">Right Justify Name Column</property>
|
103
|
-
<property name="visible">True</property>
|
104
|
-
<property name="can_focus">True</property>
|
105
|
-
<property name="receives_default">False</property>
|
106
|
-
<property name="use_action_appearance">False</property>
|
107
|
-
<property name="relief">none</property>
|
108
|
-
<property name="draw_indicator">True</property>
|
109
|
-
</object>
|
110
|
-
<packing>
|
111
|
-
<property name="top_attach">1</property>
|
112
|
-
<property name="bottom_attach">2</property>
|
113
|
-
</packing>
|
114
|
-
</child>
|
115
|
-
<child>
|
116
|
-
<object class="GtkCheckButton" id="bold">
|
117
|
-
<property name="label" translatable="yes">Make Song Text Bold</property>
|
118
|
-
<property name="visible">True</property>
|
119
|
-
<property name="can_focus">True</property>
|
120
|
-
<property name="receives_default">False</property>
|
121
|
-
<property name="use_action_appearance">False</property>
|
122
|
-
<property name="draw_indicator">True</property>
|
123
|
-
</object>
|
124
|
-
<packing>
|
125
|
-
<property name="top_attach">3</property>
|
126
|
-
<property name="bottom_attach">4</property>
|
127
|
-
</packing>
|
128
|
-
</child>
|
129
|
-
<child>
|
130
|
-
<object class="GtkCheckButton" id="background">
|
131
|
-
<property name="label" translatable="yes">Make Song Background Yellow</property>
|
132
|
-
<property name="visible">True</property>
|
133
|
-
<property name="can_focus">True</property>
|
134
|
-
<property name="receives_default">False</property>
|
135
|
-
<property name="use_action_appearance">False</property>
|
136
|
-
<property name="draw_indicator">True</property>
|
137
|
-
</object>
|
138
|
-
<packing>
|
139
|
-
<property name="left_attach">1</property>
|
140
|
-
<property name="right_attach">2</property>
|
141
|
-
</packing>
|
142
|
-
</child>
|
143
|
-
<child>
|
144
|
-
<object class="GtkCheckButton" id="center">
|
145
|
-
<property name="label" translatable="yes">Center Artist Header</property>
|
146
|
-
<property name="visible">True</property>
|
147
|
-
<property name="can_focus">True</property>
|
148
|
-
<property name="receives_default">False</property>
|
149
|
-
<property name="use_action_appearance">False</property>
|
150
|
-
<property name="draw_indicator">True</property>
|
151
|
-
</object>
|
152
|
-
<packing>
|
153
|
-
<property name="left_attach">1</property>
|
154
|
-
<property name="right_attach">2</property>
|
155
|
-
<property name="top_attach">1</property>
|
156
|
-
<property name="bottom_attach">2</property>
|
157
|
-
</packing>
|
158
|
-
</child>
|
159
|
-
<child>
|
160
|
-
<object class="GtkCheckButton" id="editable">
|
161
|
-
<property name="label" translatable="yes">Turn Off Editing</property>
|
162
|
-
<property name="visible">True</property>
|
163
|
-
<property name="can_focus">True</property>
|
164
|
-
<property name="receives_default">False</property>
|
165
|
-
<property name="use_action_appearance">False</property>
|
166
|
-
<property name="draw_indicator">True</property>
|
167
|
-
</object>
|
168
|
-
<packing>
|
169
|
-
<property name="left_attach">1</property>
|
170
|
-
<property name="right_attach">2</property>
|
171
|
-
<property name="top_attach">2</property>
|
172
|
-
<property name="bottom_attach">3</property>
|
173
|
-
</packing>
|
174
|
-
</child>
|
175
|
-
<child>
|
176
|
-
<object class="GtkCheckButton" id="digits">
|
177
|
-
<property name="label" translatable="yes">Make Qty Digits show 10ths</property>
|
178
|
-
<property name="visible">True</property>
|
179
|
-
<property name="can_focus">True</property>
|
180
|
-
<property name="receives_default">False</property>
|
181
|
-
<property name="use_action_appearance">False</property>
|
182
|
-
<property name="draw_indicator">True</property>
|
183
|
-
</object>
|
184
|
-
<packing>
|
185
|
-
<property name="left_attach">1</property>
|
186
|
-
<property name="right_attach">2</property>
|
187
|
-
<property name="top_attach">3</property>
|
188
|
-
<property name="bottom_attach">4</property>
|
189
|
-
</packing>
|
190
|
-
</child>
|
191
|
-
<child>
|
192
|
-
<object class="GtkCheckButton" id="radio">
|
193
|
-
<property name="label" translatable="yes">Make Ok Boxes 'Radio' Type</property>
|
194
|
-
<property name="visible">True</property>
|
195
|
-
<property name="can_focus">True</property>
|
196
|
-
<property name="receives_default">False</property>
|
197
|
-
<property name="use_action_appearance">False</property>
|
198
|
-
<property name="draw_indicator">True</property>
|
199
|
-
</object>
|
200
|
-
</child>
|
201
|
-
</object>
|
202
|
-
<packing>
|
203
|
-
<property name="expand">False</property>
|
204
|
-
<property name="fill">False</property>
|
205
|
-
<property name="padding">10</property>
|
206
|
-
<property name="position">2</property>
|
207
|
-
</packing>
|
208
|
-
</child>
|
209
|
-
</object>
|
210
|
-
<packing>
|
211
|
-
<property name="expand">True</property>
|
212
|
-
<property name="fill">True</property>
|
213
|
-
<property name="padding">10</property>
|
214
|
-
<property name="position">0</property>
|
215
|
-
</packing>
|
216
|
-
</child>
|
217
|
-
</object>
|
218
|
-
</child>
|
219
|
-
</object>
|
220
|
-
</interface>
|
@@ -1,19 +0,0 @@
|
|
1
|
-
#!/usr/bin/ruby
|
2
|
-
|
3
|
-
require 'rubygems'
|
4
|
-
require 'gtk2'
|
5
|
-
require 'require_all'
|
6
|
-
require 'vrlib'
|
7
|
-
|
8
|
-
#make program output in real time so errors visible in VR.
|
9
|
-
STDOUT.sync = true
|
10
|
-
STDERR.sync = true
|
11
|
-
|
12
|
-
#everything in these directories will be included
|
13
|
-
my_path = File.expand_path(File.dirname(__FILE__))
|
14
|
-
|
15
|
-
require_all Dir.glob(my_path + "/bin/**/*.rb")
|
16
|
-
|
17
|
-
x = SongListViewGUI.new
|
18
|
-
x.show
|
19
|
-
|
@@ -1,16 +0,0 @@
|
|
1
|
-
--- !ruby/object:VR_ENV
|
2
|
-
current_file: "/home/eric/vrp/vr2/visualruby_examples/listview_objects/bin/ListViewObjectsGUI.rb"
|
3
|
-
height: 600
|
4
|
-
open_files:
|
5
|
-
- "/home/eric/vrp/vr2/visualruby_examples/listview_objects/bin/DataObject.rb"
|
6
|
-
- "/home/eric/vrp/vr2/visualruby_examples/listview_objects/bin/ListViewObjectsGUI.rb"
|
7
|
-
- "/home/eric/vrp/vr2/visualruby_examples/listview_objects/bin/ListViewObjects.rb"
|
8
|
-
- "/home/eric/vrp/vr2/visualruby_examples/listview_objects/bin/DataObjectGUI.rb"
|
9
|
-
open_folders:
|
10
|
-
- "/home/eric/vrp/vr2/visualruby_examples/listview_objects"
|
11
|
-
- "/home/eric/vrp/vr2/visualruby_examples/listview_objects/bin"
|
12
|
-
panel_pos: 360
|
13
|
-
rdoc_command_line: rdoc -x README
|
14
|
-
run_command_line: ruby main.rb
|
15
|
-
width: 800
|
16
|
-
settings_file_version: 1
|
@@ -1,32 +0,0 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
class DataObject
|
4
|
-
|
5
|
-
include GladeGUI
|
6
|
-
|
7
|
-
def initialize(name, address, email, phone)
|
8
|
-
@name = name
|
9
|
-
@address = address
|
10
|
-
@email = email
|
11
|
-
@phone = phone
|
12
|
-
end
|
13
|
-
|
14
|
-
|
15
|
-
def buttonSave__clicked(*args)
|
16
|
-
get_glade_variables()
|
17
|
-
destroy_window()
|
18
|
-
end
|
19
|
-
|
20
|
-
def to_s
|
21
|
-
"#{@name} (#{@email})"
|
22
|
-
end
|
23
|
-
|
24
|
-
def visual_attributes()
|
25
|
-
{ :background => email_valid? ? "white" : "yellow" }
|
26
|
-
end
|
27
|
-
|
28
|
-
def email_valid?
|
29
|
-
@email =~ /\A[\w\._%-]+@[\w\.-]+\.[a-zA-Z]{2,4}\z/
|
30
|
-
end
|
31
|
-
|
32
|
-
end
|