Module: TkItemConfigOptkeys
- Includes:
- TkUtil
- Included in:
- Tk::BLT::PlotComponent::Element, Tk::BLT::PlotComponent::Marker, Tk::Vu::ChartsConfig, TkItemConfigMethod, TkcItem
- Defined in:
- lib/tk/itemconfig.rb
Constant Summary
Constants included from TkUtil
TkUtil::None, TkUtil::RELEASE_DATE
Instance Method Summary collapse
- #__conv_item_keyonly_opts(id, keys) ⇒ Object
- #itemconfig_hash_kv(id, keys, enc_mode = nil, conf = nil) ⇒ Object
Methods included from TkUtil
#_conv_args, _conv_args, #_fromUTF8, #_get_eval_enc_str, _get_eval_enc_str, #_get_eval_string, _get_eval_string, _symbolkey2str, #_symbolkey2str, #_toUTF8, #bool, bool, callback, eval_cmd, #hash_kv, hash_kv, install_cmd, #num_or_nil, num_or_nil, num_or_str, #num_or_str, number, #number, string, #string, uninstall_cmd, untrust
Instance Method Details
#__conv_item_keyonly_opts(id, keys) ⇒ Object
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/tk/itemconfig.rb', line 94 def __conv_item_keyonly_opts(id, keys) return keys unless keys.kind_of?(Hash) keyonly = __item_keyonly_optkeys(id) keys2 = {} keys.each{|k, v| optkey = keyonly.find{|kk,vv| kk.to_s == k.to_s} if optkey defkey, undefkey = optkey if v keys2[defkey.to_s] = None else keys2[undefkey.to_s] = None end else keys2[k.to_s] = v end } keys2 end |
#itemconfig_hash_kv(id, keys, enc_mode = nil, conf = nil) ⇒ Object
114 115 116 |
# File 'lib/tk/itemconfig.rb', line 114 def itemconfig_hash_kv(id, keys, enc_mode = nil, conf = nil) hash_kv(__conv_item_keyonly_opts(id, keys), enc_mode, conf) end |