cb_all_widgets 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 89da9d8cb8fe64589a62808313e293a23ccfe237
4
+ data.tar.gz: 188039a0af3064d654b67dc33b25e991039e7deb
5
+ SHA512:
6
+ metadata.gz: 0f9aaa448c35fc1e56d61bb62d2576f41e9dfadca27ce426fb49228e4a5d36d1861bf8d7707dabf86a9fdcad543ae860080117c7ab95aef58c2d28be5d85adee
7
+ data.tar.gz: f67db68307113a1654ce64255dcf6d88ee4e13a27a2955917dee277551cb29a8b21ed4c94e2466dd63469ef12b621edb0d0627f8bc5efa4cb7b7afafb84fdfa1
data/bin/AllWidgets.rb ADDED
@@ -0,0 +1,43 @@
1
+ ##
2
+ # This file shows all the widget types that auto-fill when you
3
+ # call set_glade variables(). You can use any type of
4
+ # widget in your programs, but you'll need to populate
5
+ # them yourself using the @builder for your class. An example
6
+ # of using the @builder to populate a widget is in the code
7
+ # below: The checkbutton is populated automatically with
8
+ # the value "true," but the label of the checkbutton needs
9
+ # to be set in glade, or here in your code. This line set the
10
+ # label:
11
+ #
12
+ # @builder["checkbutton1"].label = "I'm a Check Button"
13
+ #
14
+ # You can see the result when you run the program.
15
+ #
16
+ # Note: you must add an "adjustment" object to the spinbutton in glade
17
+ # to make it work.
18
+ #
19
+
20
+ class AllWidgets
21
+
22
+ include GladeGUI
23
+
24
+ def show()
25
+ load_glade(__FILE__) #loads file, glade/MyClass.glade into @builder
26
+ @label1 = "I'm a Label"
27
+ @checkbutton1 = true
28
+ @builder["checkbutton1"].label = "I'm a Check Button" #this could be set in glade
29
+ @image1 = "bin/splash.png"
30
+ @linkbutton1 = "http://www.visualruby.net"
31
+ @entry1 = "I'm an Entry Box"
32
+ @progressbar1 = 0.85 # text property set in glade
33
+ @textview1 = "I'm a Textview"
34
+ @spinbutton1 = 10.5
35
+ @fontbutton1 = "Courier 10"
36
+ @calendar1 = DateTime.new(2011, 5, 14)
37
+ set_glade_variables() #populates glade controls with insance variables (i.e. Myclass.label1)
38
+ show_window()
39
+ end
40
+
41
+
42
+ end
43
+
@@ -0,0 +1,166 @@
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="window_position">center-always</property>
8
+ <signal name="destroy" handler="destroy_window"/>
9
+ <child>
10
+ <object class="GtkHBox" id="hbox1">
11
+ <property name="visible">True</property>
12
+ <child>
13
+ <object class="GtkVBox" id="vbox2">
14
+ <property name="visible">True</property>
15
+ <property name="spacing">10</property>
16
+ <child>
17
+ <object class="GtkImage" id="image1">
18
+ <property name="width_request">330</property>
19
+ <property name="height_request">200</property>
20
+ <property name="visible">True</property>
21
+ </object>
22
+ <packing>
23
+ <property name="padding">10</property>
24
+ <property name="position">0</property>
25
+ </packing>
26
+ </child>
27
+ <child>
28
+ <object class="GtkLabel" id="label1">
29
+ <property name="visible">True</property>
30
+ <property name="label" translatable="yes">label</property>
31
+ </object>
32
+ <packing>
33
+ <property name="position">1</property>
34
+ </packing>
35
+ </child>
36
+ <child>
37
+ <object class="GtkCheckButton" id="checkbutton1">
38
+ <property name="label" translatable="yes">checkbutton</property>
39
+ <property name="visible">True</property>
40
+ <property name="can_focus">True</property>
41
+ <property name="receives_default">False</property>
42
+ <property name="draw_indicator">True</property>
43
+ </object>
44
+ <packing>
45
+ <property name="position">2</property>
46
+ </packing>
47
+ </child>
48
+ <child>
49
+ <object class="GtkSpinButton" id="spinbutton1">
50
+ <property name="visible">True</property>
51
+ <property name="can_focus">True</property>
52
+ <property name="invisible_char">•</property>
53
+ <property name="adjustment">adjustment1</property>
54
+ <property name="climb_rate">0.10000000000000001</property>
55
+ <property name="digits">1</property>
56
+ <property name="numeric">True</property>
57
+ </object>
58
+ <packing>
59
+ <property name="padding">10</property>
60
+ <property name="position">3</property>
61
+ </packing>
62
+ </child>
63
+ <child>
64
+ <object class="GtkLinkButton" id="linkbutton1">
65
+ <property name="label" translatable="yes">button</property>
66
+ <property name="visible">True</property>
67
+ <property name="can_focus">True</property>
68
+ <property name="receives_default">True</property>
69
+ <property name="has_tooltip">True</property>
70
+ <property name="relief">none</property>
71
+ <property name="uri">http://glade.gnome.org</property>
72
+ </object>
73
+ <packing>
74
+ <property name="position">4</property>
75
+ </packing>
76
+ </child>
77
+ <child>
78
+ <object class="GtkEntry" id="entry1">
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="position">5</property>
85
+ </packing>
86
+ </child>
87
+ <child>
88
+ <object class="GtkProgressBar" id="progressbar1">
89
+ <property name="visible">True</property>
90
+ <property name="fraction">0.080000000000000002</property>
91
+ <property name="text" translatable="yes">I'm a progressbar</property>
92
+ </object>
93
+ <packing>
94
+ <property name="padding">10</property>
95
+ <property name="position">6</property>
96
+ </packing>
97
+ </child>
98
+ </object>
99
+ <packing>
100
+ <property name="padding">10</property>
101
+ <property name="position">0</property>
102
+ </packing>
103
+ </child>
104
+ <child>
105
+ <object class="GtkVBox" id="vbox1">
106
+ <property name="visible">True</property>
107
+ <child>
108
+ <object class="GtkCalendar" id="calendar1">
109
+ <property name="visible">True</property>
110
+ <property name="can_focus">True</property>
111
+ <property name="year">2012</property>
112
+ <property name="month">2</property>
113
+ <property name="day">12</property>
114
+ </object>
115
+ <packing>
116
+ <property name="expand">False</property>
117
+ <property name="fill">False</property>
118
+ <property name="padding">10</property>
119
+ <property name="position">0</property>
120
+ </packing>
121
+ </child>
122
+ <child>
123
+ <object class="GtkHButtonBox" id="hbuttonbox1">
124
+ <property name="visible">True</property>
125
+ <child>
126
+ <object class="GtkFontButton" id="fontbutton1">
127
+ <property name="visible">True</property>
128
+ <property name="can_focus">True</property>
129
+ <property name="receives_default">True</property>
130
+ </object>
131
+ <packing>
132
+ <property name="expand">False</property>
133
+ <property name="fill">False</property>
134
+ <property name="position">0</property>
135
+ </packing>
136
+ </child>
137
+ </object>
138
+ <packing>
139
+ <property name="position">1</property>
140
+ </packing>
141
+ </child>
142
+ <child>
143
+ <object class="GtkTextView" id="textview1">
144
+ <property name="height_request">80</property>
145
+ <property name="visible">True</property>
146
+ <property name="can_focus">True</property>
147
+ </object>
148
+ <packing>
149
+ <property name="padding">10</property>
150
+ <property name="position">2</property>
151
+ </packing>
152
+ </child>
153
+ </object>
154
+ <packing>
155
+ <property name="padding">10</property>
156
+ <property name="position">1</property>
157
+ </packing>
158
+ </child>
159
+ </object>
160
+ </child>
161
+ </object>
162
+ <object class="GtkAdjustment" id="adjustment1">
163
+ <property name="upper">100</property>
164
+ <property name="step_increment">0.10000000000000001</property>
165
+ </object>
166
+ </interface>
data/main.rb ADDED
@@ -0,0 +1,14 @@
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
+ AllWidgets.new.show
14
+
metadata ADDED
@@ -0,0 +1,90 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cb_all_widgets
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Your Name
8
+ autorequire:
9
+ bindir:
10
+ - "."
11
+ cert_chain: []
12
+ date: 2015-12-12 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: vrlib
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: 0.0.1
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: 0.0.1
28
+ - !ruby/object:Gem::Dependency
29
+ name: gtk2
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: 0.0.1
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: 0.0.1
42
+ - !ruby/object:Gem::Dependency
43
+ name: require_all
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: 0.0.1
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: 0.0.1
56
+ description: Full description here
57
+ email: you@yoursite.com
58
+ executables:
59
+ - main.rb
60
+ extensions: []
61
+ extra_rdoc_files: []
62
+ files:
63
+ - "./main.rb"
64
+ - bin/AllWidgets.rb
65
+ - bin/glade/AllWidgets.glade
66
+ - main.rb
67
+ homepage: http://www.yoursite.org/
68
+ licenses: []
69
+ metadata: {}
70
+ post_install_message:
71
+ rdoc_options: []
72
+ require_paths:
73
+ - "."
74
+ required_ruby_version: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ required_rubygems_version: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ requirements: []
85
+ rubyforge_project: nowarning
86
+ rubygems_version: 2.4.5.1
87
+ signing_key:
88
+ specification_version: 4
89
+ summary: Short Description Here.
90
+ test_files: []