tk_paradise 0.0.13 → 0.0.14
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 +4 -4
- data/README.md +5 -1
- data/doc/README.gen +4 -0
- data/lib/tk_paradise/examples/004_hello_world_example.rb +3 -1
- data/lib/tk_paradise/examples/020_entry_example.rb +29 -0
- data/lib/tk_paradise/requires/require_the_project.rb +9 -0
- data/lib/tk_paradise/tk_classes/button.rb +23 -0
- data/lib/tk_paradise/tk_paradise.rb +3 -18
- data/lib/tk_paradise/toplevel_methods/toplevel_methods.rb +16 -0
- data/lib/tk_paradise/version/version.rb +2 -2
- data/lib/tk_paradise.rb +1 -1
- metadata +9 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ca411cc5c8e399353f8c782de0830fd9826a8443149ed2db9355d477529e6e1
|
4
|
+
data.tar.gz: 6fcf5b589bf32810cecab5f260979a0d99d6679de1bae1500d822196d9ea4bb9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4100481103adbd55c2b8b6f6969095c0d98f84757e709bdc5aa2d7d7cc85b1ca869f5318a32ea1ec04621e8da17b408b10f09525c04537c2078f4f02d964aee0
|
7
|
+
data.tar.gz: 3df73099e56bd98e4ef272793154c083eb9c841ad1674a35c39a0ebc76860c1b44e24a175fc240c31db0aba3c02fd27ef6565c2348916f7673e9d945df203c19
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
[](https://www.ruby-lang.org/en/)
|
3
3
|
[](https://badge.fury.io/rb/tk_paradise)
|
4
4
|
|
5
|
-
This gem was <b>last updated</b> on the <span style="color: darkblue; font-weight: bold">
|
5
|
+
This gem was <b>last updated</b> on the <span style="color: darkblue; font-weight: bold">30.12.2023</span> (dd.mm.yyyy notation), at <span style="color: steelblue; font-weight: bold">17:02:22</span> o'clock.
|
6
6
|
|
7
7
|
## Create a new root entry:
|
8
8
|
|
@@ -29,6 +29,10 @@ This gem was <b>last updated</b> on the <span style="color: darkblue; font-weigh
|
|
29
29
|
|
30
30
|
root.withdraw
|
31
31
|
|
32
|
+
## Moving the root-window towards the top-left corner:
|
33
|
+
|
34
|
+
root.move(0,0)
|
35
|
+
|
32
36
|
## Disallow the root window from being resized:
|
33
37
|
|
34
38
|
Tk.root.resizable(false, false) # boolean value: (width, height)
|
data/doc/README.gen
CHANGED
@@ -11,11 +11,13 @@ TkLabel.new(root) {
|
|
11
11
|
text 'Hello, World!'
|
12
12
|
pack { padx 25 ; pady 25; side 'left' }
|
13
13
|
}
|
14
|
+
# =========================================================================== #
|
14
15
|
# Add the hello world button next:
|
16
|
+
# =========================================================================== #
|
15
17
|
button = TkButton.new(root) {
|
16
18
|
text 'Hello, World!'
|
17
19
|
}
|
18
|
-
button.
|
20
|
+
button.on_clicked {
|
19
21
|
e 'HEY'
|
20
22
|
}
|
21
23
|
pp button.methods.sort
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
require 'tk_paradise'
|
6
|
+
require 'colours/autoinclude'
|
7
|
+
|
8
|
+
root = TkRoot.new { title 'Hello, world!' }
|
9
|
+
|
10
|
+
TkLabel.new(root) {
|
11
|
+
text 'Hello, World!'
|
12
|
+
pack { padx 25 ; pady 25; side 'left' }
|
13
|
+
}
|
14
|
+
# =========================================================================== #
|
15
|
+
# Add the hello world button next:
|
16
|
+
# =========================================================================== #
|
17
|
+
button = TkButton.new(root) {
|
18
|
+
text 'Hello, World!'
|
19
|
+
}
|
20
|
+
|
21
|
+
entry1 = TkParadise.create_entry(root)
|
22
|
+
|
23
|
+
button.on_clicked {
|
24
|
+
e 'The button was clicked.'
|
25
|
+
}
|
26
|
+
button.pack
|
27
|
+
entry1.pack
|
28
|
+
root.move(0,0)
|
29
|
+
Tk.mainloop
|
@@ -0,0 +1,9 @@
|
|
1
|
+
require 'tk_paradise/tk_paradise.rb'
|
2
|
+
# =========================================================================== #
|
3
|
+
# Next, require some addons - modifications of core-tk classes.
|
4
|
+
# =========================================================================== #
|
5
|
+
require 'tk_paradise/tk_classes/button.rb'
|
6
|
+
require 'tk_paradise/tk_classes/label.rb'
|
7
|
+
require 'tk_paradise/tk_classes/root.rb'
|
8
|
+
|
9
|
+
require 'tk_paradise/toplevel_methods/toplevel_methods.rb'
|
@@ -0,0 +1,23 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
# require 'tk_paradise/tk_classes/button.rb'
|
6
|
+
# =========================================================================== #
|
7
|
+
# module Tk
|
8
|
+
# =========================================================================== #
|
9
|
+
class TkButton
|
10
|
+
|
11
|
+
# ========================================================================= #
|
12
|
+
# === on_clicked
|
13
|
+
# ========================================================================= #
|
14
|
+
alias on_clicked command
|
15
|
+
|
16
|
+
# ========================================================================= #
|
17
|
+
# === set_font
|
18
|
+
# ========================================================================= #
|
19
|
+
def set_font(i)
|
20
|
+
self['font'] = i
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
@@ -2,6 +2,8 @@
|
|
2
2
|
# Encoding: UTF-8
|
3
3
|
# frozen_string_literal: true
|
4
4
|
# =========================================================================== #
|
5
|
+
# This file will directly modify module Tk.
|
6
|
+
# =========================================================================== #
|
5
7
|
# require 'tk_paradise/tk_paradise.rb'
|
6
8
|
# include Tk
|
7
9
|
# =========================================================================== #
|
@@ -129,26 +131,9 @@ module Tk
|
|
129
131
|
# def tk_button
|
130
132
|
# end; alias button tk_button # === button
|
131
133
|
|
132
|
-
class Button
|
133
|
-
|
134
|
-
# ======================================================================= #
|
135
|
-
# === set_font
|
136
|
-
# ======================================================================= #
|
137
|
-
def set_font(i)
|
138
|
-
self['font'] = i
|
139
|
-
end
|
140
|
-
|
141
|
-
end
|
142
|
-
|
143
134
|
# create button
|
144
135
|
# button = Button(gui, text='My Button', bg='#0052cc', fg='#ffffff')
|
145
136
|
# # apply font to the button label
|
146
137
|
# button['font'] = myFont
|
147
138
|
|
148
|
-
end
|
149
|
-
|
150
|
-
# =========================================================================== #
|
151
|
-
# Next, require some addons - modifications of core-tk classes.
|
152
|
-
# =========================================================================== #
|
153
|
-
require 'tk_paradise/tk_classes/label.rb'
|
154
|
-
require 'tk_paradise/tk_classes/root.rb'
|
139
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
# require 'tk_paradise/toplevel_methods/toplevel_methods.rb'
|
6
|
+
# =========================================================================== #
|
7
|
+
module TkParadise
|
8
|
+
|
9
|
+
# ========================================================================= #
|
10
|
+
# === TkParadise.create_entry
|
11
|
+
# ========================================================================= #
|
12
|
+
def self.create_entry(root_window)
|
13
|
+
return TkEntry.new(root_window)
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
@@ -9,11 +9,11 @@ module Tk
|
|
9
9
|
# ========================================================================= #
|
10
10
|
# === VERSION
|
11
11
|
# ========================================================================= #
|
12
|
-
VERSION = '0.0.
|
12
|
+
VERSION = '0.0.14'
|
13
13
|
|
14
14
|
# ========================================================================= #
|
15
15
|
# === LAST_UPDATE
|
16
16
|
# ========================================================================= #
|
17
|
-
LAST_UPDATE = '
|
17
|
+
LAST_UPDATE = '30.12.2023'
|
18
18
|
|
19
19
|
end
|
data/lib/tk_paradise.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tk_paradise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert A. Heiler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colours
|
@@ -72,11 +72,15 @@ files:
|
|
72
72
|
- lib/tk_paradise/examples/017_combo_box_example.rb
|
73
73
|
- lib/tk_paradise/examples/018_tk_list_box_example.rb
|
74
74
|
- lib/tk_paradise/examples/019_tk_curves.rb
|
75
|
+
- lib/tk_paradise/examples/020_entry_example.rb
|
75
76
|
- lib/tk_paradise/examples/advanced/0001_example_showing_move_method.rb
|
76
77
|
- lib/tk_paradise/examples/advanced/0019_tk_curves.rb
|
78
|
+
- lib/tk_paradise/requires/require_the_project.rb
|
79
|
+
- lib/tk_paradise/tk_classes/button.rb
|
77
80
|
- lib/tk_paradise/tk_classes/label.rb
|
78
81
|
- lib/tk_paradise/tk_classes/root.rb
|
79
82
|
- lib/tk_paradise/tk_paradise.rb
|
83
|
+
- lib/tk_paradise/toplevel_methods/toplevel_methods.rb
|
80
84
|
- lib/tk_paradise/version/version.rb
|
81
85
|
- tk_paradise.gemspec
|
82
86
|
homepage: https://rubygems.org/gems/tk_paradise
|
@@ -91,14 +95,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
91
95
|
requirements:
|
92
96
|
- - ">="
|
93
97
|
- !ruby/object:Gem::Version
|
94
|
-
version: 3.2.
|
98
|
+
version: 3.2.0
|
95
99
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
100
|
requirements:
|
97
101
|
- - ">="
|
98
102
|
- !ruby/object:Gem::Version
|
99
|
-
version: 3.
|
103
|
+
version: 3.5.3
|
100
104
|
requirements: []
|
101
|
-
rubygems_version: 3.
|
105
|
+
rubygems_version: 3.5.3
|
102
106
|
signing_key:
|
103
107
|
specification_version: 4
|
104
108
|
summary: This project is called tk_paradise. It provides some helper-code for ruby-tk
|