Module: Tk::BLT::DragDrop

Extended by:
ValidateConfigure, TkCore, TkItemConfigMethod
Defined in:
lib/tkextlib/blt/dragdrop.rb

Defined Under Namespace

Classes: DnD_Handle, PackageCommand, SiteCommand, Token

Constant Summary collapse

TkCommandNames =
['::blt::drag&drop'.freeze].freeze

Constants included from TkUtil

TkUtil::None, TkUtil::RELEASE_DATE

Constants included from TkCore

TkCore::EventFlag, TkCore::INTERP, TkCore::INTERP_MUTEX, TkCore::INTERP_ROOT_CHECK, TkCore::INTERP_THREAD, TkCore::INTERP_THREAD_STATUS, TkCore::RUN_EVENTLOOP_ON_MAIN_THREAD, TkCore::WIDGET_DESTROY_HOOK, TkCore::WITH_ENCODING, TkCore::WITH_RUBY_VM

Constants included from TkComm

TkComm::GET_CONFIGINFO_AS_ARRAY, TkComm::GET_CONFIGINFOwoRES_AS_ARRAY, TkComm::TkExtlibAutoloadModule, TkComm::Tk_CMDTBL, TkComm::Tk_IDs, TkComm::Tk_WINDOWS, TkComm::USE_TCLs_LIST_FUNCTIONS, TkComm::WidgetClassNames

Class Method Summary collapse

Methods included from ValidateConfigure

__conv_vcmd_on_hash_kv, __def_validcmd, __get_validate_key2class, __validation_class_list, __validcmd_call, configure

Methods included from TkItemConfigMethod

__IGNORE_UNKNOWN_CONFIGURE_OPTION__, __check_available_itemconfigure_options, __current_itemconfiginfo, __set_IGNORE_UNKNOWN_CONFIGURE_OPTION__!, current_itemconfiginfo, itemcget, itemcget_strict, itemcget_tkstring, itemconfiginfo, itemconfigure, tagid

Methods included from TkItemConfigOptkeys

#__conv_item_keyonly_opts, #itemconfig_hash_kv

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

Methods included from TkTreatItemFont

#kanjifont_copy, #kanjitagfont_configure, #latintagfont_configure, #latintagfont_copy, #tagfont_configinfo, #tagfont_configure, #tagfont_copy

Methods included from TkCore

_tk_call_to_list_core, after, after_cancel, after_idle, appname, appsend, appsend_deny, appsend_displayof, callback, callback_break, callback_continue, callback_return, chooseColor, chooseDirectory, do_one_event, event_generate, getMultipleOpenFile, getMultipleSaveFile, getOpenFile, getSaveFile, get_eventloop_tick, get_eventloop_weight, get_no_event_wait, inactive, inactive_displayof, info, ip_eval, ip_eval_with_enc, ip_eval_without_enc, ip_invoke, ip_invoke_with_enc, ip_invoke_without_enc, is_mainloop?, load_cmd_on_ip, mainloop, mainloop_exist?, mainloop_thread?, mainloop_watchdog, messageBox, rb_appsend, rb_appsend_displayof, reset_inactive, reset_inactive_displayof, restart, scaling, scaling_displayof, set_eventloop_tick, set_eventloop_weight, set_no_event_wait, tk_call, tk_call_to_list, tk_call_to_list_with_enc, tk_call_to_list_without_enc, tk_call_to_simplelist, tk_call_to_simplelist_with_enc, tk_call_to_simplelist_without_enc, tk_call_with_enc, tk_call_without_enc, windowingsystem

Methods included from TkComm

_at, _callback_entry?, _callback_entry_class?, _curr_cmd_id, _fromUTF8, _genobj_for_tkwidget, _next_cmd_id, _toUTF8, array2tk_list, #bind, #bind_all, #bind_append, #bind_append_all, #bind_remove, #bind_remove_all, #bindinfo, #bindinfo_all, bool, image_obj, #install_cmd, install_cmd, list, num_or_nil, num_or_str, number, procedure, simplelist, slice_ary, string, #subst, tk_tcl2ruby, uninstall_cmd, #uninstall_cmd, window

Methods included from TkEvent

#install_bind, #install_bind_for_event_class

Class Method Details

.__item_boolval_optkeys(id) ⇒ Object



43
44
45
# File 'lib/tkextlib/blt/dragdrop.rb', line 43

def __item_boolval_optkeys(id)
  super(id) << 'selftarget'
end

.__item_config_cmd(id) ⇒ Object

id := [‘source’|‘target’, win]



38
39
40
# File 'lib/tkextlib/blt/dragdrop.rb', line 38

def __item_config_cmd(id)  # id := ['source'|'target', win]
  ['::blt::drag&drop', id[0], id[1]]
end

.__item_listval_optkeys(id) ⇒ Object



48
49
50
# File 'lib/tkextlib/blt/dragdrop.rb', line 48

def __item_listval_optkeys(id)
  super(id) << 'send'
end

.__item_strval_optkeys(id) ⇒ Object



53
54
55
# File 'lib/tkextlib/blt/dragdrop.rb', line 53

def __item_strval_optkeys(id)
  super(id) << 'rejectbg' << 'rejectfg' << 'tokenbg'
end

.__validation_class_listObject



160
161
162
# File 'lib/tkextlib/blt/dragdrop.rb', line 160

def self.__validation_class_list
  super() << PackageCommand << SiteCommand
end

.activeObject



262
263
264
# File 'lib/tkextlib/blt/dragdrop.rb', line 262

def self.active
  bool(tk_call('::blt::drag&drop', 'active'))
end

.current_source_configinfo(win, slot = nil) ⇒ Object



68
69
70
# File 'lib/tkextlib/blt/dragdrop.rb', line 68

def current_source_configinfo(win, slot=nil)
  current_itemconfiginfo(['source', win], slot)
end

.drag(win, x, y) ⇒ Object



251
252
253
# File 'lib/tkextlib/blt/dragdrop.rb', line 251

def self.drag(win, x, y)
  tk_call('::blt::drag&drop', 'drag', win, x, y)
end

.drop(win, x, y) ⇒ Object



254
255
256
# File 'lib/tkextlib/blt/dragdrop.rb', line 254

def self.drop(win, x, y)
  tk_call('::blt::drag&drop', 'drop', win, x, y)
end

.errors(cmd = Proc.new) ⇒ Object



258
259
260
# File 'lib/tkextlib/blt/dragdrop.rb', line 258

def self.errors(cmd=Proc.new)
  tk_call('::blt::drag&drop', 'errors', cmd)
end

.handle_target(win, type, val = None) ⇒ Object



243
244
245
# File 'lib/tkextlib/blt/dragdrop.rb', line 243

def self.handle_target(win, type, val=None)
  tk_call('::blt::drag&drop', 'target', win, 'handle', type, val)
end

.init_source(win) ⇒ Object



221
222
223
# File 'lib/tkextlib/blt/dragdrop.rb', line 221

def self.init_source(win)
  tk_call('::blt::drag&drop', 'source', win)
end

.location(x = None, y = None) ⇒ Object



266
267
268
# File 'lib/tkextlib/blt/dragdrop.rb', line 266

def self.location(x=None, y=None)
  list(tk_call('::blt::drag&drop', 'location', x, y))
end

.sourceObject



225
226
227
# File 'lib/tkextlib/blt/dragdrop.rb', line 225

def self.source()
  list(tk_call('::blt::drag&drop', 'source'))
end

.source_configinfo(win, slot = nil) ⇒ Object



65
66
67
# File 'lib/tkextlib/blt/dragdrop.rb', line 65

def source_configinfo(win, slot=nil)
  itemconfiginfo(['source', win], slot)
end

.source_configure(win, slot, value = None) ⇒ Object



62
63
64
# File 'lib/tkextlib/blt/dragdrop.rb', line 62

def source_configure(win, slot, value=None)
  itemconfigure(['source', win], slot, value)
end

.source_handler(win, datatype, cmd = Proc.new, *args) ⇒ Object



207
208
209
210
211
# File 'lib/tkextlib/blt/dragdrop.rb', line 207

def self.source_handler(win, datatype, cmd=Proc.new, *args)
  _bind_for_event_class(DnD_Handle,
                        ['::blt::drag&drop', 'source', win, 'handler'],
                        cmd, *args)
end

.source_handler_info(win, type) ⇒ Object



232
233
234
# File 'lib/tkextlib/blt/dragdrop.rb', line 232

def self.source_handler_info(win, type)
  tk_tcl2ruby(tk_call('::blt::drag&drop', 'source', win, 'handler', type))
end

.source_handler_list(win) ⇒ Object



229
230
231
# File 'lib/tkextlib/blt/dragdrop.rb', line 229

def self.source_handler_list(win)
  simplelist(tk_call('::blt::drag&drop', 'source', win, 'handler'))
end

.targetObject



236
237
238
# File 'lib/tkextlib/blt/dragdrop.rb', line 236

def self.target
  list(tk_call('::blt::drag&drop', 'target'))
end

.target_handler(win, datatype, cmd = Proc.new, *args) ⇒ Object



213
214
215
216
217
# File 'lib/tkextlib/blt/dragdrop.rb', line 213

def self.target_handler(win, datatype, cmd=Proc.new, *args)
  _bind_for_event_class(DnD_Handle,
                        ['::blt::drag&drop', 'target', win, 'handler'],
                        cmd, *args)
end

.target_handler_list(win) ⇒ Object



239
240
241
# File 'lib/tkextlib/blt/dragdrop.rb', line 239

def self.target_handler_list(win)
  simplelist(tk_call('::blt::drag&drop', 'target', win, 'handler'))
end

.token(win) ⇒ Object



247
248
249
# File 'lib/tkextlib/blt/dragdrop.rb', line 247

def self.token(win)
  window(tk_call('::blt::drag&drop', 'token', win))
end