glimmer-dsl-tk 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 795ec888a423df168b27805ca72bb845e59784134838cb01f65c63ce683d8c5f
4
- data.tar.gz: d54e9355ae521246e6b2394e3350f1786cf185a01115504847247f116d715cbf
3
+ metadata.gz: 0ce8665311ec56974f2f930183c6cd2ad4b2867436ddffbdf66984659f0e830f
4
+ data.tar.gz: 13ddbe796e17917d0e392fc61e7c96443f430e4f403ff9730cd6b92e24b424aa
5
5
  SHA512:
6
- metadata.gz: d9aa0e7c01d07179a4ee40b9dd796f3dd9ace09448f3b4b03df253a731fd73aa39b3bbb7936e32e40d9a1950442d1f7e54fd8804bd257eb69f7e0506114be131
7
- data.tar.gz: 7e57301dfd0a4ff29cb5e8a3d10d96d8ba5bb7d12c4af85baa70313639e5b1f6696936e7d0b0dde8319289b6b9fdb19c704813806669cc8ff263b537c72df46f
6
+ metadata.gz: b005addc832a5f0af7aeb0285d41dc8e52b40d61088ea16272657c65ddcdbaa92c6af09cb11fd5fb34de6de1b10a11f2d6d0e31d9f2b1a279a0fbaa14fd17b21
7
+ data.tar.gz: 2a154821ce05f1f53d0bbd8c3336daea2b4c2ee709753f9b3872015f839a1e5a41747666171481ef658d4e682f43e137659b692089a641520b20f5b95f0d1e8f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.0.11
4
+
5
+ - Add preliminary support for `treeview` (no data-binding) with `columns`, `show`, and `heading_configure` attributes/methods
6
+
3
7
  ## 0.0.10
4
8
 
5
9
  - puts_debuggerer gem to help consumers with debugging in and out of girb
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 />](https://github.com/AndyObtiva/glimmer) Glimmer DSL for Tk 0.0.10
1
+ # [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 />](https://github.com/AndyObtiva/glimmer) Glimmer DSL for Tk 0.0.11
2
2
  ## MRI Ruby Desktop Development GUI Library
3
3
  [![Gem Version](https://badge.fury.io/rb/glimmer-dsl-tk.svg)](http://badge.fury.io/rb/glimmer-dsl-tk)
4
4
  [![Coverage Status](https://coveralls.io/repos/github/AndyObtiva/glimmer-dsl-tk/badge.svg?branch=master)](https://coveralls.io/github/AndyObtiva/glimmer-dsl-tk?branch=master)
@@ -50,6 +50,7 @@ NOTE: Glimmer DSL for Tk is in alpha mode. Please help make better by contributi
50
50
 
51
51
  Other [Glimmer](https://github.com/AndyObtiva/glimmer) DSL gems:
52
52
  - [glimmer-dsl-swt](https://github.com/AndyObtiva/glimmer-dsl-swt): Glimmer DSL for SWT (JRuby Desktop Development GUI Framework)
53
+ - [glimmer-dsl-libui](https://github.com/AndyObtiva/glimmer-dsl-libui): Glimmer DSL for LibUI (Prerequisite-Free Ruby Desktop Development GUI Library)
53
54
  - [glimmer-dsl-opal](https://github.com/AndyObtiva/glimmer-dsl-opal): Glimmer DSL for Opal (Pure Ruby Web GUI and Auto-Webifier of Desktop Apps)
54
55
  - [glimmer-dsl-xml](https://github.com/AndyObtiva/glimmer-dsl-xml): Glimmer DSL for XML (& HTML)
55
56
  - [glimmer-dsl-css](https://github.com/AndyObtiva/glimmer-dsl-css): Glimmer DSL for CSS (Cascading Style Sheets)
@@ -80,7 +81,7 @@ gem install glimmer-dsl-tk
80
81
 
81
82
  Add the following to `Gemfile`:
82
83
  ```
83
- gem 'glimmer-dsl-tk', '~> 0.0.10'
84
+ gem 'glimmer-dsl-tk', '~> 0.0.11'
84
85
  ```
85
86
 
86
87
  And, then run:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.10
1
+ 0.0.11
Binary file
@@ -58,3 +58,4 @@ require 'glimmer/tk/button_proxy'
58
58
  require 'glimmer/tk/label_proxy'
59
59
  require 'glimmer/tk/list_proxy'
60
60
  require 'glimmer/tk/entry_proxy'
61
+ require 'glimmer/tk/treeview_proxy'
@@ -0,0 +1,50 @@
1
+ # Copyright (c) 2020-2021 Andy Maleh
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person obtaining
4
+ # a copy of this software and associated documentation files (the
5
+ # "Software"), to deal in the Software without restriction, including
6
+ # without limitation the rights to use, copy, modify, merge, publish,
7
+ # distribute, sublicense, and/or sell copies of the Software, and to
8
+ # permit persons to whom the Software is furnished to do so, subject to
9
+ # the following conditions:
10
+ #
11
+ # The above copyright notice and this permission notice shall be
12
+ # included in all copies or substantial portions of the Software.
13
+ #
14
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
22
+ require 'glimmer/tk/widget_proxy'
23
+
24
+ module Glimmer
25
+ module Tk
26
+ # Custom treeview widget implementation
27
+ class TreeviewProxy < WidgetProxy
28
+ def has_attribute?(attribute, *args)
29
+ attribute == 'columns' || super
30
+ end
31
+
32
+ def set_attribute(attribute, *args)
33
+ if attribute == 'columns'
34
+ self[attribute] = args.first
35
+ else
36
+ super
37
+ end
38
+ end
39
+
40
+ def get_attribute(attribute)
41
+ if attribute == 'columns'
42
+ self[attribute]
43
+ else
44
+ super
45
+ end
46
+ end
47
+
48
+ end
49
+ end
50
+ end
@@ -133,7 +133,7 @@ module Glimmer
133
133
  elsif tk_widget_has_attribute_setter?(attribute)
134
134
  @tk.send(attribute_setter(attribute), *args) unless @tk.send(attribute) == args.first
135
135
  elsif tk_widget_has_attribute_getter_setter?(attribute)
136
- @tk.send(attribute, *args) unless @tk.send(attribute) == args.first
136
+ @tk.send(attribute, *args)
137
137
  else
138
138
  send(attribute_setter(attribute), args)
139
139
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer-dsl-tk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - AndyMaleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-15 00:00:00.000000000 Z
11
+ date: 2021-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: glimmer
@@ -206,6 +206,7 @@ files:
206
206
  - lib/glimmer/tk/list_proxy.rb
207
207
  - lib/glimmer/tk/notebook_proxy.rb
208
208
  - lib/glimmer/tk/root_proxy.rb
209
+ - lib/glimmer/tk/treeview_proxy.rb
209
210
  - lib/glimmer/tk/widget_proxy.rb
210
211
  - samples/hello/hello_combo.rb
211
212
  - samples/hello/hello_computed.rb