diff options
Diffstat (limited to 'ext/tk/lib/tk/canvas.rb')
-rw-r--r-- | ext/tk/lib/tk/canvas.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ext/tk/lib/tk/canvas.rb b/ext/tk/lib/tk/canvas.rb index 97bc6cc14a..94b43ebc39 100644 --- a/ext/tk/lib/tk/canvas.rb +++ b/ext/tk/lib/tk/canvas.rb @@ -11,11 +11,25 @@ require 'tk/scrollable' module TkCanvasItemConfig include TkItemConfigMethod + def __item_strval_optkeys(id) + # maybe need to override + super(id) + [ + 'fill', 'activefill', 'disabledfill', + 'outline', 'activeoutline', 'disabledoutline' + ] + end + private :__item_strval_optkeys + def __item_methodcall_optkeys(id) {'coords'=>'coords'} end private :__item_methodcall_optkeys + def __item_val2ruby_optkeys(id) # { key=>proc, ... } + super(id).update('window'=>proc{|i, v| window(v)}) + end + private :__val2ruby_optkeys + def __item_pathname(tagOrId) if tagOrId.kind_of?(TkcItem) || tagOrId.kind_of?(TkcTag) self.path + ';' + tagOrId.id.to_s @@ -47,6 +61,16 @@ class TkCanvas<TkWindow #end #private :create_self + def __numval_optkeys + super() + ['closeenough'] + end + private :__numval_optkeys + + def __boolval_optkeys + super() + ['confine'] + end + private :__boolval_optkeys + def tagid(tag) if tag.kind_of?(TkcItem) || tag.kind_of?(TkcTag) tag.id |