ffi-tk 2010.01.02 → 2010.02

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ tags
data/AUTHORS CHANGED
@@ -1,5 +1,5 @@
1
1
  Following persons have contributed to ffi-tk.
2
2
  (Sorted by number of submitted patches, then alphabetically)
3
3
 
4
- 185 Michael Fellinger <m.fellinger@gmail.com>
4
+ 217 Michael Fellinger <m.fellinger@gmail.com>
5
5
  18 Julian Langschaedel <meta.rb@gmail.com>
data/CHANGELOG CHANGED
@@ -1,3 +1,133 @@
1
+ [e1ae1ee | 2010-02-14 18:34:03 UTC] Michael Fellinger <m.fellinger@gmail.com>
2
+
3
+ * Version 2010.02
4
+
5
+ [a84139f | 2010-02-11 15:16:14 UTC] Michael Fellinger <m.fellinger@gmail.com>
6
+
7
+ * Parse the grid_info
8
+
9
+ [848118d | 2010-02-10 01:35:13 UTC] Michael Fellinger <m.fellinger@gmail.com>
10
+
11
+ * Remove debugging output from canvas bind
12
+
13
+ [860e5eb | 2010-02-03 15:53:47 UTC] Michael Fellinger <m.fellinger@gmail.com>
14
+
15
+ * Tile::Treeview is Scrollable
16
+
17
+ [bb895e7 | 2010-02-02 16:22:12 UTC] Michael Fellinger <m.fellinger@gmail.com>
18
+
19
+ * Make sure we return strings from Focus::focus
20
+
21
+ [9906882 | 2010-02-01 05:45:57 UTC] Michael Fellinger <m.fellinger@gmail.com>
22
+
23
+ * Tk::get_color should run in thread_sender if needed
24
+
25
+ [a3c410f | 2010-01-30 04:07:03 UTC] Michael Fellinger <m.fellinger@gmail.com>
26
+
27
+ * Version 2010.01
28
+
29
+ [08ea2af | 2010-01-30 04:05:57 UTC] Michael Fellinger <m.fellinger@gmail.com>
30
+
31
+ * Version 2009.01
32
+
33
+ [8ae78b3 | 2010-01-28 18:47:39 UTC] Michael Fellinger <m.fellinger@gmail.com>
34
+
35
+ * Return Items for Treeview#selection
36
+
37
+ [3a65a4a | 2010-01-28 13:25:25 UTC] Michael Fellinger <m.fellinger@gmail.com>
38
+
39
+ * Define correct methods for ttk::panedwindow
40
+
41
+ [7e23eef | 2010-01-25 09:21:33 UTC] Michael Fellinger <m.fellinger@gmail.com>
42
+
43
+ * Make sure all files are valid ASCII
44
+
45
+ [08d7237 | 2010-01-22 20:51:36 UTC] Michael Fellinger <m.fellinger@gmail.com>
46
+
47
+ * Improve some more around Bind and add a spec
48
+
49
+ [f03669c | 2010-01-22 19:39:13 UTC] Michael Fellinger <m.fellinger@gmail.com>
50
+
51
+ * Allow lookup of existing binds for Bind and BindTag
52
+
53
+ [9c0188f | 2010-01-20 15:00:45 UTC] Michael Fellinger <m.fellinger@gmail.com>
54
+
55
+ * Adding Event::Data.resend
56
+
57
+ [d479e70 | 2010-01-19 01:40:23 UTC] Michael Fellinger <m.fellinger@gmail.com>
58
+
59
+ * Fix Event::generate by converting options
60
+
61
+ [afabe51 | 2010-01-18 12:30:49 UTC] Michael Fellinger <m.fellinger@gmail.com>
62
+
63
+ * Add shortcut to get from event data to widget instance
64
+
65
+ [5b0bbb0 | 2010-01-18 07:41:05 UTC] Michael Fellinger <m.fellinger@gmail.com>
66
+
67
+ * Relay full exception with backtrace to tcl when something goes wrong in a callback or event
68
+
69
+ [c94a30f | 2010-01-18 07:25:55 UTC] Michael Fellinger <m.fellinger@gmail.com>
70
+
71
+ * Add Clipboard::set
72
+
73
+ [0dfb69e | 2010-01-16 15:58:48 UTC] Michael Fellinger <m.fellinger@gmail.com>
74
+
75
+ * Add convenience methods for a few obscure but helpful tk procs
76
+
77
+ [0a25db7 | 2010-01-15 15:19:03 UTC] Michael Fellinger <m.fellinger@gmail.com>
78
+
79
+ * Add little example for picking themes
80
+
81
+ [c1813f5 | 2010-01-14 14:49:41 UTC] Michael Fellinger <m.fellinger@gmail.com>
82
+
83
+ * Fixing some commands for Tile::Notebook
84
+
85
+ [2673fec | 2010-01-14 14:49:22 UTC] Michael Fellinger <m.fellinger@gmail.com>
86
+
87
+ * Fixing Place::configure
88
+
89
+ [855fc4a | 2010-01-11 05:10:08 UTC] Michael Fellinger <m.fellinger@gmail.com>
90
+
91
+ * Revert "Correct usage of ffi_lib" until new FFI gem is out.
92
+
93
+ This reverts commit b6f9b0aab4255e545fcee087ba4b72b76168db60.
94
+
95
+ [b6f9b0a | 2010-01-11 05:02:29 UTC] Michael Fellinger <m.fellinger@gmail.com>
96
+
97
+ * Correct usage of ffi_lib
98
+
99
+ [35c816d | 2010-01-06 03:57:38 UTC] Michael Fellinger <m.fellinger@gmail.com>
100
+
101
+ * Adding .gitignore
102
+
103
+ [eda8832 | 2010-01-05 17:33:31 UTC] Michael Fellinger <m.fellinger@gmail.com>
104
+
105
+ * Add FFI::Tk::get_color
106
+
107
+ [764a4fe | 2010-01-05 08:20:15 UTC] Michael Fellinger <m.fellinger@gmail.com>
108
+
109
+ * Fix Text#dump
110
+
111
+ [0b480a3 | 2010-01-03 17:41:12 UTC] Michael Fellinger <m.fellinger@gmail.com>
112
+
113
+ * Fix String#to_tcl, take care of {}
114
+
115
+ [25a628d | 2010-01-03 16:40:04 UTC] Michael Fellinger <m.fellinger@gmail.com>
116
+
117
+ * Handle case when the array thought to contain configuration doesn't contain any
118
+
119
+ [bc5eef4 | 2010-01-02 07:40:27 UTC] Michael Fellinger <m.fellinger@gmail.com>
120
+
121
+ * Fix bug in Treeview#selection_set and add Treeview::Item#selection_set
122
+
123
+ [6064ac0 | 2010-01-02 07:40:05 UTC] Michael Fellinger <m.fellinger@gmail.com>
124
+
125
+ * Fix bug in Grid::columnconfigure
126
+
127
+ [3e84b8d | 2010-01-02 07:39:12 UTC] Michael Fellinger <m.fellinger@gmail.com>
128
+
129
+ * Version 2010.01.02
130
+
1
131
  [b4c87c4 | 2010-01-01 18:37:44 UTC] Michael Fellinger <m.fellinger@gmail.com>
2
132
 
3
133
  * Refine handling of event data
data/MANIFEST CHANGED
@@ -1,3 +1,4 @@
1
+ .gitignore
1
2
  AUTHORS
2
3
  CHANGELOG
3
4
  MANIFEST
@@ -20,6 +21,7 @@ example/tile/kroc_demo_small.rb
20
21
  example/tile/kroc_rb_demo.rb
21
22
  example/tile/notebook.rb
22
23
  example/tile/theme_hello.rb
24
+ example/tile/themes.rb
23
25
  example/tile/treeview.rb
24
26
  example/tkgo.rb
25
27
  example/various.rb
@@ -126,6 +128,7 @@ lib/ffi-tk/widget/tile/sizegrip.rb
126
128
  lib/ffi-tk/widget/tile/style.rb
127
129
  lib/ffi-tk/widget/tile/treeview.rb
128
130
  lib/ffi-tk/widget/toplevel.rb
131
+ spec/ffi-tk/command/bind.rb
129
132
  spec/ffi-tk/command/bindtags.rb
130
133
  spec/ffi-tk/command/clipboard.rb
131
134
  spec/ffi-tk/command/font.rb
@@ -0,0 +1,13 @@
1
+ require 'ffi-tk'
2
+
3
+ Tk::Tile::Style.theme_names.each do |name|
4
+ button = Tk::Tile::Button.new(
5
+ text: name,
6
+ command: ->{ Tk::Tile.set_theme(name) })
7
+ button.pack side: :top, anchor: :nw
8
+ end
9
+
10
+ button = Tk::Tile::Button.new(text: 'Exit', command: ->{ Tk.exit })
11
+ button.pack side: :top, anchor: :nw
12
+
13
+ Tk.mainloop
data/ffi-tk.gemspec CHANGED
@@ -2,14 +2,14 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{ffi-tk}
5
- s.version = "2010.01.02"
5
+ s.version = "2010.02"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.3.5") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Michael 'manveru' Fellinger"]
9
- s.date = %q{2010-01-02}
9
+ s.date = %q{2010-02-15}
10
10
  s.description = %q{Pure Ruby FFI wrapper for the Tk GUI toolkit.}
11
11
  s.email = %q{m.fellinger@gmail.com}
12
- s.files = ["AUTHORS", "CHANGELOG", "MANIFEST", "README.md", "Rakefile", "TODO.md", "bin/rwish", "doc/MIT_LICENSE", "doc/TCL_LICENSE", "example/choose_color.rb", "example/choose_directory.rb", "example/dialog.rb", "example/hello.rb", "example/message_box.rb", "example/option_menu.rb", "example/popup.rb", "example/set_palette.rb", "example/text.rb", "example/tile/kroc_demo_small.rb", "example/tile/kroc_rb_demo.rb", "example/tile/notebook.rb", "example/tile/theme_hello.rb", "example/tile/treeview.rb", "example/tkgo.rb", "example/various.rb", "example/wait.rb", "ffi-tk.gemspec", "lib/ffi-tk.rb", "lib/ffi-tk/command.rb", "lib/ffi-tk/command/after.rb", "lib/ffi-tk/command/bell.rb", "lib/ffi-tk/command/bind.rb", "lib/ffi-tk/command/bindtags.rb", "lib/ffi-tk/command/cget.rb", "lib/ffi-tk/command/choose_color.rb", "lib/ffi-tk/command/choose_directory.rb", "lib/ffi-tk/command/clipboard.rb", "lib/ffi-tk/command/configure.rb", "lib/ffi-tk/command/destroy.rb", "lib/ffi-tk/command/dialog.rb", "lib/ffi-tk/command/event.rb", "lib/ffi-tk/command/focus.rb", "lib/ffi-tk/command/font.rb", "lib/ffi-tk/command/get_open_file.rb", "lib/ffi-tk/command/get_save_file.rb", "lib/ffi-tk/command/grab.rb", "lib/ffi-tk/command/grid.rb", "lib/ffi-tk/command/image.rb", "lib/ffi-tk/command/lower.rb", "lib/ffi-tk/command/message_box.rb", "lib/ffi-tk/command/option_menu.rb", "lib/ffi-tk/command/pack.rb", "lib/ffi-tk/command/place.rb", "lib/ffi-tk/command/popup.rb", "lib/ffi-tk/command/raise.rb", "lib/ffi-tk/command/scrollable.rb", "lib/ffi-tk/command/selection.rb", "lib/ffi-tk/command/set_palette.rb", "lib/ffi-tk/command/tk_cmd.rb", "lib/ffi-tk/command/vars.rb", "lib/ffi-tk/command/wait.rb", "lib/ffi-tk/command/winfo.rb", "lib/ffi-tk/command/wm.rb", "lib/ffi-tk/core_extensions.rb", "lib/ffi-tk/event/data.rb", "lib/ffi-tk/event/handler.rb", "lib/ffi-tk/ffi/tcl.rb", "lib/ffi-tk/ffi/tcl/cmd_proc.rb", "lib/ffi-tk/ffi/tcl/eval_result.rb", "lib/ffi-tk/ffi/tcl/interp.rb", "lib/ffi-tk/ffi/tcl/obj.rb", "lib/ffi-tk/ffi/tcl/time.rb", "lib/ffi-tk/ffi/tk.rb", "lib/ffi-tk/geometry.rb", "lib/ffi-tk/thread_sender.rb", "lib/ffi-tk/tk.rb", "lib/ffi-tk/variable.rb", "lib/ffi-tk/version.rb", "lib/ffi-tk/widget.rb", "lib/ffi-tk/widget/button.rb", "lib/ffi-tk/widget/canvas.rb", "lib/ffi-tk/widget/canvas/arc.rb", "lib/ffi-tk/widget/canvas/bitmap.rb", "lib/ffi-tk/widget/canvas/image.rb", "lib/ffi-tk/widget/canvas/item.rb", "lib/ffi-tk/widget/canvas/line.rb", "lib/ffi-tk/widget/canvas/oval.rb", "lib/ffi-tk/widget/canvas/polygon.rb", "lib/ffi-tk/widget/canvas/rectangle.rb", "lib/ffi-tk/widget/canvas/text.rb", "lib/ffi-tk/widget/canvas/window.rb", "lib/ffi-tk/widget/checkbutton.rb", "lib/ffi-tk/widget/entry.rb", "lib/ffi-tk/widget/frame.rb", "lib/ffi-tk/widget/label.rb", "lib/ffi-tk/widget/labelframe.rb", "lib/ffi-tk/widget/listbox.rb", "lib/ffi-tk/widget/menu.rb", "lib/ffi-tk/widget/menubutton.rb", "lib/ffi-tk/widget/message.rb", "lib/ffi-tk/widget/panedwindow.rb", "lib/ffi-tk/widget/radiobutton.rb", "lib/ffi-tk/widget/root.rb", "lib/ffi-tk/widget/scale.rb", "lib/ffi-tk/widget/scrollbar.rb", "lib/ffi-tk/widget/spinbox.rb", "lib/ffi-tk/widget/text.rb", "lib/ffi-tk/widget/text/peer.rb", "lib/ffi-tk/widget/tile.rb", "lib/ffi-tk/widget/tile/button.rb", "lib/ffi-tk/widget/tile/checkbutton.rb", "lib/ffi-tk/widget/tile/combobox.rb", "lib/ffi-tk/widget/tile/entry.rb", "lib/ffi-tk/widget/tile/frame.rb", "lib/ffi-tk/widget/tile/label.rb", "lib/ffi-tk/widget/tile/labelframe.rb", "lib/ffi-tk/widget/tile/menubutton.rb", "lib/ffi-tk/widget/tile/notebook.rb", "lib/ffi-tk/widget/tile/panedwindow.rb", "lib/ffi-tk/widget/tile/progressbar.rb", "lib/ffi-tk/widget/tile/radiobutton.rb", "lib/ffi-tk/widget/tile/scale.rb", "lib/ffi-tk/widget/tile/scrollbar.rb", "lib/ffi-tk/widget/tile/separator.rb", "lib/ffi-tk/widget/tile/sizegrip.rb", "lib/ffi-tk/widget/tile/style.rb", "lib/ffi-tk/widget/tile/treeview.rb", "lib/ffi-tk/widget/toplevel.rb", "spec/ffi-tk/command/bindtags.rb", "spec/ffi-tk/command/clipboard.rb", "spec/ffi-tk/command/font.rb", "spec/ffi-tk/command/grid.rb", "spec/ffi-tk/command/image.rb", "spec/ffi-tk/command/pack.rb", "spec/ffi-tk/command/place.rb", "spec/ffi-tk/command/selection.rb", "spec/ffi-tk/command/vars.rb", "spec/ffi-tk/command/winfo.rb", "spec/ffi-tk/command/wm.rb", "spec/ffi-tk/event.rb", "spec/ffi-tk/tile/button.rb", "spec/ffi-tk/tile/checkbutton.rb", "spec/ffi-tk/tile/combobox.rb", "spec/ffi-tk/tile/entry.rb", "spec/ffi-tk/tile/frame.rb", "spec/ffi-tk/tile/label.rb", "spec/ffi-tk/tile/labelframe.rb", "spec/ffi-tk/tile/menubutton.rb", "spec/ffi-tk/tile/notebook.rb", "spec/ffi-tk/tile/panedwindow.rb", "spec/ffi-tk/tile/progressbar.rb", "spec/ffi-tk/tile/radiobutton.rb", "spec/ffi-tk/tile/scale.rb", "spec/ffi-tk/tile/scrollbar.rb", "spec/ffi-tk/tile/separator.rb", "spec/ffi-tk/tile/sizegrip.rb", "spec/ffi-tk/tile/style.rb", "spec/ffi-tk/tile/treeview.rb", "spec/ffi-tk/variable.rb", "spec/ffi-tk/widget/button.rb", "spec/ffi-tk/widget/canvas.rb", "spec/ffi-tk/widget/checkbutton.rb", "spec/ffi-tk/widget/entry.rb", "spec/ffi-tk/widget/frame.rb", "spec/ffi-tk/widget/label.rb", "spec/ffi-tk/widget/labelframe.rb", "spec/ffi-tk/widget/listbox.rb", "spec/ffi-tk/widget/menu.rb", "spec/ffi-tk/widget/menubutton.rb", "spec/ffi-tk/widget/message.rb", "spec/ffi-tk/widget/panedwindow.rb", "spec/ffi-tk/widget/radiobutton.rb", "spec/ffi-tk/widget/root.rb", "spec/ffi-tk/widget/scale.rb", "spec/ffi-tk/widget/scrollbar.rb", "spec/ffi-tk/widget/spinbox.rb", "spec/ffi-tk/widget/text.rb", "spec/ffi-tk/widget/toplevel.rb", "spec/helper.rb", "tasks/authors.rake", "tasks/bacon.rake", "tasks/changelog.rake", "tasks/gem.rake", "tasks/gem_setup.rake", "tasks/grancher.rake", "tasks/manifest.rake", "tasks/rcov.rake", "tasks/release.rake", "tasks/reversion.rake", "tasks/setup.rake", "tasks/ycov.rake"]
12
+ s.files = [".gitignore", "AUTHORS", "CHANGELOG", "MANIFEST", "README.md", "Rakefile", "TODO.md", "bin/rwish", "doc/MIT_LICENSE", "doc/TCL_LICENSE", "example/choose_color.rb", "example/choose_directory.rb", "example/dialog.rb", "example/hello.rb", "example/message_box.rb", "example/option_menu.rb", "example/popup.rb", "example/set_palette.rb", "example/text.rb", "example/tile/kroc_demo_small.rb", "example/tile/kroc_rb_demo.rb", "example/tile/notebook.rb", "example/tile/theme_hello.rb", "example/tile/themes.rb", "example/tile/treeview.rb", "example/tkgo.rb", "example/various.rb", "example/wait.rb", "ffi-tk.gemspec", "lib/ffi-tk.rb", "lib/ffi-tk/command.rb", "lib/ffi-tk/command/after.rb", "lib/ffi-tk/command/bell.rb", "lib/ffi-tk/command/bind.rb", "lib/ffi-tk/command/bindtags.rb", "lib/ffi-tk/command/cget.rb", "lib/ffi-tk/command/choose_color.rb", "lib/ffi-tk/command/choose_directory.rb", "lib/ffi-tk/command/clipboard.rb", "lib/ffi-tk/command/configure.rb", "lib/ffi-tk/command/destroy.rb", "lib/ffi-tk/command/dialog.rb", "lib/ffi-tk/command/event.rb", "lib/ffi-tk/command/focus.rb", "lib/ffi-tk/command/font.rb", "lib/ffi-tk/command/get_open_file.rb", "lib/ffi-tk/command/get_save_file.rb", "lib/ffi-tk/command/grab.rb", "lib/ffi-tk/command/grid.rb", "lib/ffi-tk/command/image.rb", "lib/ffi-tk/command/lower.rb", "lib/ffi-tk/command/message_box.rb", "lib/ffi-tk/command/option_menu.rb", "lib/ffi-tk/command/pack.rb", "lib/ffi-tk/command/place.rb", "lib/ffi-tk/command/popup.rb", "lib/ffi-tk/command/raise.rb", "lib/ffi-tk/command/scrollable.rb", "lib/ffi-tk/command/selection.rb", "lib/ffi-tk/command/set_palette.rb", "lib/ffi-tk/command/tk_cmd.rb", "lib/ffi-tk/command/vars.rb", "lib/ffi-tk/command/wait.rb", "lib/ffi-tk/command/winfo.rb", "lib/ffi-tk/command/wm.rb", "lib/ffi-tk/core_extensions.rb", "lib/ffi-tk/event/data.rb", "lib/ffi-tk/event/handler.rb", "lib/ffi-tk/ffi/tcl.rb", "lib/ffi-tk/ffi/tcl/cmd_proc.rb", "lib/ffi-tk/ffi/tcl/eval_result.rb", "lib/ffi-tk/ffi/tcl/interp.rb", "lib/ffi-tk/ffi/tcl/obj.rb", "lib/ffi-tk/ffi/tcl/time.rb", "lib/ffi-tk/ffi/tk.rb", "lib/ffi-tk/geometry.rb", "lib/ffi-tk/thread_sender.rb", "lib/ffi-tk/tk.rb", "lib/ffi-tk/variable.rb", "lib/ffi-tk/version.rb", "lib/ffi-tk/widget.rb", "lib/ffi-tk/widget/button.rb", "lib/ffi-tk/widget/canvas.rb", "lib/ffi-tk/widget/canvas/arc.rb", "lib/ffi-tk/widget/canvas/bitmap.rb", "lib/ffi-tk/widget/canvas/image.rb", "lib/ffi-tk/widget/canvas/item.rb", "lib/ffi-tk/widget/canvas/line.rb", "lib/ffi-tk/widget/canvas/oval.rb", "lib/ffi-tk/widget/canvas/polygon.rb", "lib/ffi-tk/widget/canvas/rectangle.rb", "lib/ffi-tk/widget/canvas/text.rb", "lib/ffi-tk/widget/canvas/window.rb", "lib/ffi-tk/widget/checkbutton.rb", "lib/ffi-tk/widget/entry.rb", "lib/ffi-tk/widget/frame.rb", "lib/ffi-tk/widget/label.rb", "lib/ffi-tk/widget/labelframe.rb", "lib/ffi-tk/widget/listbox.rb", "lib/ffi-tk/widget/menu.rb", "lib/ffi-tk/widget/menubutton.rb", "lib/ffi-tk/widget/message.rb", "lib/ffi-tk/widget/panedwindow.rb", "lib/ffi-tk/widget/radiobutton.rb", "lib/ffi-tk/widget/root.rb", "lib/ffi-tk/widget/scale.rb", "lib/ffi-tk/widget/scrollbar.rb", "lib/ffi-tk/widget/spinbox.rb", "lib/ffi-tk/widget/text.rb", "lib/ffi-tk/widget/text/peer.rb", "lib/ffi-tk/widget/tile.rb", "lib/ffi-tk/widget/tile/button.rb", "lib/ffi-tk/widget/tile/checkbutton.rb", "lib/ffi-tk/widget/tile/combobox.rb", "lib/ffi-tk/widget/tile/entry.rb", "lib/ffi-tk/widget/tile/frame.rb", "lib/ffi-tk/widget/tile/label.rb", "lib/ffi-tk/widget/tile/labelframe.rb", "lib/ffi-tk/widget/tile/menubutton.rb", "lib/ffi-tk/widget/tile/notebook.rb", "lib/ffi-tk/widget/tile/panedwindow.rb", "lib/ffi-tk/widget/tile/progressbar.rb", "lib/ffi-tk/widget/tile/radiobutton.rb", "lib/ffi-tk/widget/tile/scale.rb", "lib/ffi-tk/widget/tile/scrollbar.rb", "lib/ffi-tk/widget/tile/separator.rb", "lib/ffi-tk/widget/tile/sizegrip.rb", "lib/ffi-tk/widget/tile/style.rb", "lib/ffi-tk/widget/tile/treeview.rb", "lib/ffi-tk/widget/toplevel.rb", "spec/ffi-tk/command/bind.rb", "spec/ffi-tk/command/bindtags.rb", "spec/ffi-tk/command/clipboard.rb", "spec/ffi-tk/command/font.rb", "spec/ffi-tk/command/grid.rb", "spec/ffi-tk/command/image.rb", "spec/ffi-tk/command/pack.rb", "spec/ffi-tk/command/place.rb", "spec/ffi-tk/command/selection.rb", "spec/ffi-tk/command/vars.rb", "spec/ffi-tk/command/winfo.rb", "spec/ffi-tk/command/wm.rb", "spec/ffi-tk/event.rb", "spec/ffi-tk/tile/button.rb", "spec/ffi-tk/tile/checkbutton.rb", "spec/ffi-tk/tile/combobox.rb", "spec/ffi-tk/tile/entry.rb", "spec/ffi-tk/tile/frame.rb", "spec/ffi-tk/tile/label.rb", "spec/ffi-tk/tile/labelframe.rb", "spec/ffi-tk/tile/menubutton.rb", "spec/ffi-tk/tile/notebook.rb", "spec/ffi-tk/tile/panedwindow.rb", "spec/ffi-tk/tile/progressbar.rb", "spec/ffi-tk/tile/radiobutton.rb", "spec/ffi-tk/tile/scale.rb", "spec/ffi-tk/tile/scrollbar.rb", "spec/ffi-tk/tile/separator.rb", "spec/ffi-tk/tile/sizegrip.rb", "spec/ffi-tk/tile/style.rb", "spec/ffi-tk/tile/treeview.rb", "spec/ffi-tk/variable.rb", "spec/ffi-tk/widget/button.rb", "spec/ffi-tk/widget/canvas.rb", "spec/ffi-tk/widget/checkbutton.rb", "spec/ffi-tk/widget/entry.rb", "spec/ffi-tk/widget/frame.rb", "spec/ffi-tk/widget/label.rb", "spec/ffi-tk/widget/labelframe.rb", "spec/ffi-tk/widget/listbox.rb", "spec/ffi-tk/widget/menu.rb", "spec/ffi-tk/widget/menubutton.rb", "spec/ffi-tk/widget/message.rb", "spec/ffi-tk/widget/panedwindow.rb", "spec/ffi-tk/widget/radiobutton.rb", "spec/ffi-tk/widget/root.rb", "spec/ffi-tk/widget/scale.rb", "spec/ffi-tk/widget/scrollbar.rb", "spec/ffi-tk/widget/spinbox.rb", "spec/ffi-tk/widget/text.rb", "spec/ffi-tk/widget/toplevel.rb", "spec/helper.rb", "tasks/authors.rake", "tasks/bacon.rake", "tasks/changelog.rake", "tasks/gem.rake", "tasks/gem_setup.rake", "tasks/grancher.rake", "tasks/manifest.rake", "tasks/rcov.rake", "tasks/release.rake", "tasks/reversion.rake", "tasks/setup.rake", "tasks/ycov.rake"]
13
13
  s.homepage = %q{http://github.com/manveru/ffi-tk}
14
14
  s.require_paths = ["lib"]
15
15
  s.rubygems_version = %q{1.3.5}
@@ -1,11 +1,28 @@
1
1
  module Tk
2
2
  module Bind
3
- def self.bind(pathname, sequence, &block)
4
- Event::Handler.register(pathname, sequence, &block)
3
+ def self.bind(tag, sequence = None)
4
+ if None == sequence
5
+ Tk.execute(:bind, tag).to_a
6
+ else
7
+ if block_given?
8
+ Event::Handler.register(tag, sequence, &Proc.new)
9
+ else
10
+ Tk.execute(:bind, tag, sequence).to_s
11
+ end
12
+ end
5
13
  end
6
14
 
7
- def bind(sequence, &block)
15
+ # TODO: remove the block associated
16
+ def self.unbind(tag, sequence)
17
+ Event::Handler.unregister(tag, sequence)
18
+ end
19
+
20
+ def bind(sequence = None, &block)
8
21
  Bind.bind(tk_pathname, sequence, &block)
9
22
  end
23
+
24
+ def unbind(sequence)
25
+ Bind.unbind(tk_pathname, sequence)
26
+ end
10
27
  end
11
- end
28
+ end
@@ -58,12 +58,16 @@ module Tk
58
58
  end
59
59
 
60
60
  class BindTag < Struct.new(:name)
61
- def bind(sequence, &block)
61
+ def bind(sequence = None, &block)
62
62
  Bind.bind(name, sequence, &block)
63
63
  end
64
64
 
65
+ def unbind(sequence)
66
+ Bind.unbind(name, sequence)
67
+ end
68
+
65
69
  def to_tcl
66
70
  TclString.new(name)
67
71
  end
68
72
  end
69
- end
73
+ end
@@ -21,8 +21,7 @@ module Tk
21
21
  end
22
22
 
23
23
  def clipboard_set(string, options = {})
24
- clipboard_clear
25
- clipboard_append(options.merge(data: string))
24
+ Clipboard.set(string, options)
26
25
  end
27
26
 
28
27
  module_function
@@ -85,6 +84,12 @@ module Tk
85
84
  Tk.execute_only(:clipboard, :append, *args)
86
85
  end
87
86
 
87
+ # Shortcut to clear clipboard and append given +string+.
88
+ def set(string, options = {})
89
+ clear
90
+ append(options.merge(data: string))
91
+ end
92
+
88
93
  # Retrieve data from the clipboard on +window+'s display.
89
94
  # +window+ defaults to ".".
90
95
  # +type+ specifies the form in which the data is to be returned and should be
@@ -60,7 +60,7 @@ module Tk
60
60
  # processed. Certain events, such as key events, require that the window has
61
61
  # focus to receive the event properly.
62
62
  def self.generate(window = None, event = None, options = {})
63
- Tk.execute_only(:event, :generate, window, event, options)
63
+ Tk.execute_only(:event, :generate, window, event, options.to_tcl_options)
64
64
  end
65
65
 
66
66
  # Returns information about virtual events.
@@ -76,4 +76,4 @@ module Tk
76
76
  Tk.execute(:event, :info, virtual).to_a
77
77
  end
78
78
  end
79
- end
79
+ end
@@ -5,17 +5,17 @@ module Tk
5
5
 
6
6
  def focus(window = None, option = None)
7
7
  if window == None
8
- Tk.execute('focus')
8
+ Tk.execute('focus').to_s
9
9
  else
10
10
  case option
11
11
  when None
12
- Tk.execute('focus', window)
12
+ Tk.execute('focus', window).to_s
13
13
  when :displayof
14
- Tk.execute('focus', '-displayof', window)
14
+ Tk.execute('focus', '-displayof', window).to_s
15
15
  when :force
16
- Tk.execute_only('focus', '-force', window)
16
+ Tk.execute_only('focus', '-force', window).to_s
17
17
  when :lastfor
18
- Tk.execute('focus', '-lastfor', window)
18
+ Tk.execute('focus', '-lastfor', window).to_s
19
19
  else
20
20
  raise ArgumentError, "option must be one of: None, :displayof, :force, :lastfor"
21
21
  end
@@ -67,4 +67,4 @@ module Tk
67
67
  Tk.execute(:tk_focusPrev, window)
68
68
  end
69
69
  end
70
- end
70
+ end
@@ -25,7 +25,7 @@ module Tk
25
25
  # mouse motion events are reported to window, and window entry and window exit
26
26
  # events are ignored.
27
27
  #
28
- # The grab subtree “owns” the pointer: windows outside the grab subtree
28
+ # The grab subtree owns the pointer: windows outside the grab subtree
29
29
  # will be visible on the screen but they will be insensitive until the grab is
30
30
  # released. The tree of windows underneath the grab window can include
31
31
  # top-level windows, in which case all of those top-level windows and their
@@ -138,4 +138,4 @@ module Tk
138
138
  Tk.execute(:grab, :set, '-global', window)
139
139
  end
140
140
  end
141
- end
141
+ end
@@ -70,9 +70,9 @@ module Tk
70
70
  # If only an option is specified, with no value, the current value of that
71
71
  # option is returned.
72
72
  # If only the master window and index is specified, all the current settings
73
- # are returned in a list of “-option value” pairs.
74
- def self.columnconfigure(master, index, options = {})
75
- Tk.execute('grid', 'columnconfigure', master, index, options)
73
+ # are returned in a list of "-option value" pairs.
74
+ def self.columnconfigure(master, index, options = None)
75
+ Tk.execute('grid', 'columnconfigure', master, index, options.to_tcl_options?)
76
76
  end
77
77
 
78
78
  # The arguments consist of the names of one or more slave windows followed
@@ -97,10 +97,23 @@ module Tk
97
97
  # Returns a list whose elements are the current configuration state of the
98
98
  # slave given by slave in the same option-value form that might be specified
99
99
  # to grid configure.
100
- # The first two elements of the list are “-in master” where master is
100
+ # The first two elements of the list are "-in master" where master is
101
101
  # the slave's master.
102
102
  def self.info(slave)
103
- Tk.execute('grid', 'info', slave)
103
+ info = Tk.execute('grid', 'info', slave).to_s
104
+ hash = {}
105
+
106
+ info.scan(/(?:-(\w+))\s+([^-][\S]*)/) do
107
+ key = $1.to_sym
108
+ case key
109
+ when :column, :row, :columnspan, :rowspan, :ipadx, :ipady, :padx, :pady
110
+ hash[key] = Integer($2)
111
+ else
112
+ hash[key] = $2.to_str
113
+ end
114
+ end
115
+
116
+ hash
104
117
  end
105
118
 
106
119
  # Given x and y values in screen units relative to the master window, the
@@ -148,7 +161,7 @@ module Tk
148
161
  # If only an option is specified, with no value, the current value of that
149
162
  # option is returned.
150
163
  # If only the master window and index is specified, all the current settings
151
- # are returned in a list of “-option value” pairs.
164
+ # are returned in a list of "-option value" pairs.
152
165
  def self.rowconfigure(master, index, options = None)
153
166
  Tk.execute('grid', 'rowconfigure', master, index, options.to_tcl_options?)
154
167
  end
@@ -194,8 +207,8 @@ module Tk
194
207
  end
195
208
 
196
209
  # @see Grid::columnconfigure
197
- def grid_columnconfigure(index, options = {})
198
- Grid.columnconfigure(self, index, options.to_tcl_options)
210
+ def grid_columnconfigure(index, options = None)
211
+ Grid.columnconfigure(self, index, options)
199
212
  end
200
213
 
201
214
  # @see Grid::configure
@@ -32,11 +32,7 @@ module Tk
32
32
  # option(s) to have the given value(s); in this case the command returns
33
33
  # nil.
34
34
  def self.configure(window, options = None)
35
- if options == None
36
- Tk.execute('place', 'configure', window)
37
- else
38
- Tk.execute_only('place', 'configure', window, options)
39
- end
35
+ Configure.common(Tk, [:place, :configure, window], options)
40
36
  end
41
37
 
42
38
  def self.forget(window)
@@ -88,4 +84,4 @@ module Tk
88
84
  Place.slaves(self)
89
85
  end
90
86
  end
91
- end
87
+ end
@@ -31,14 +31,14 @@ module Tk
31
31
  # This command shifts the view in the window left or right according to
32
32
  # number and what.
33
33
  # What must be units, pages or pixels.
34
- # If what is units or pages then number must be an integer, otherwise
35
- # number may be specified in any of the forms accept│ able to
36
- # Tk_GetPixels, such as 2.0c or 1i (the result is rounded to the
37
- # nearest integer value.
34
+ # If what is units or pages then number must be an integer, otherwise
35
+ # number may be specified in any of the forms acceptable to
36
+ # Tk_GetPixels, such as "2.0c" or "1i" (the result is rounded to the
37
+ # nearest integer value.
38
38
  # If no units are given, pixels are assumed).
39
- # If what is units, the view adjusts left or right by number
40
- # average-width characters on the display; if it is pages then the view
41
- # adjusts by number screenfuls; if it is pixels then the view adjusts by
39
+ # If what is units, the view adjusts left or right by number
40
+ # average-width characters on the display; if it is pages then the view
41
+ # adjusts by number screenfuls; if it is pixels then the view adjusts by
42
42
  # number pixels.
43
43
  # If number is negative then characters farther to the left become visible;
44
44
  # if it is positive then characters farther to the right become visible.
@@ -75,11 +75,11 @@ module Tk
75
75
  # Fraction is a fraction between 0 and 1; 0 indicates the first pixel of
76
76
  # the first character in the text, 0.33 indicates the pixel that is
77
77
  # one-third the way through the text; and so on.
78
- # Values close to 1 will indicate values close to the last pixel in the
79
- # text (1 actually refers to one pixel beyond the last pixel), but in
80
- # such cases the widget will never scroll beyond the last pixel, and so a
81
- # value of 1 will effectively be rounded back to whatever fraction
82
- # ensures the last pixel is at the bottom of the window, and some other
78
+ # Values close to 1 will indicate values close to the last pixel in the
79
+ # text (1 actually refers to one pixel beyond the last pixel), but in
80
+ # such cases the widget will never scroll beyond the last pixel, and so a
81
+ # value of 1 will effectively be rounded back to whatever fraction
82
+ # ensures the last pixel is at the bottom of the window, and some other
83
83
  # pixel is at the top.
84
84
  def yview_moveto(fraction)
85
85
  execute_only(:yview, :moveto, fraction)
@@ -88,14 +88,14 @@ module Tk
88
88
  # This command adjust the view in the window up or down according to number
89
89
  # and what.
90
90
  # What must be units, pages or pixels.
91
- # If what is units or pages then number must be an integer, otherwise
92
- # number may be specified in any of the forms accept│ able to
93
- # Tk_GetPixels, such as 2.0c or 1i (the result is rounded to the
94
- # nearest integer value.
91
+ # If what is units or pages then number must be an integer, otherwise
92
+ # number may be specified in any of the forms acceptable to
93
+ # Tk_GetPixels, such as "2.0c" or "1i" (the result is rounded to the
94
+ # nearest integer value.
95
95
  # If no units are given, pixels are assumed).
96
- # If what is units, the view adjusts up or down by number lines on the
97
- # display; if it is pages then the view adjusts by number screenfuls; if
98
- # it is pixels then the view adjusts by number pixels.
96
+ # If what is units, the view adjusts up or down by number lines on the
97
+ # display; if it is pages then the view adjusts by number screenfuls; if
98
+ # it is pixels then the view adjusts by number pixels.
99
99
  # If number is negative then earlier positions in the text become visible;
100
100
  # if it is positive then later positions in the text become visible.
101
101
  def yview_scroll(number, what)