Module: Tk::Busy

Extended by:
TkCore, TkItemConfigMethod
Includes:
TkCore
Included in:
TkWindow
Defined in:
lib/tk/busy.rb,
lib/tk/busy.rb

Constant Summary

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

Instance Method Summary collapse

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_cget_cmd(win) ⇒ Object



14
15
16
17
# File 'lib/tk/busy.rb', line 14

def __item_cget_cmd(win)
  # maybe need to override
  ['tk', 'busy', 'cget', win.path]
end

.__item_config_cmd(win) ⇒ Object



20
21
22
23
# File 'lib/tk/busy.rb', line 20

def __item_config_cmd(win)
  # maybe need to override
  ['tk', 'busy', 'configure', win.path]
end

.__item_confinfo_cmd(win) ⇒ Object



26
27
28
29
# File 'lib/tk/busy.rb', line 26

def __item_confinfo_cmd(win)
  # maybe need to override
  __item_config_cmd(win)
end

.current(pat = None) ⇒ Object



74
75
76
# File 'lib/tk/busy.rb', line 74

def current(pat=None)
  list(tk_call('tk', 'busy', 'current', pat))
end

.forget(*wins) ⇒ Object



69
70
71
72
# File 'lib/tk/busy.rb', line 69

def forget(*wins)
  tk_call_without_enc('tk', 'busy', 'forget', *wins)
  self
end

.hold(win, keys = {}) ⇒ Object



64
65
66
67
# File 'lib/tk/busy.rb', line 64

def hold(win, keys={})
  tk_call_without_enc('tk', 'busy', 'hold', win, *hash_kv(keys))
  win
end

.method_missing(id, *args) ⇒ Object



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/tk/busy.rb', line 42

def method_missing(id, *args)
  name = id.id2name
  case args.length
  when 1
    if name[-1] == ?=
      configure name[0..-2], args[0]
      args[0]
    else
      configure name, args[0]
      self
    end
  when 0
    begin
      cget(name)
    rescue
      super(id, *args)
    end
  else
    super(id, *args)
  end
end

.status(win) ⇒ Object



78
79
80
# File 'lib/tk/busy.rb', line 78

def status(win)
  bool(tk_call_without_enc('tk', 'busy', 'status', win))
end

Instance Method Details

#busy(keys = {}) ⇒ Object Also known as: busy_hold



101
102
103
104
# File 'lib/tk/busy.rb', line 101

def busy(keys={})
  Tk::Busy.hold(self, keys)
  self
end

#busy_cget(option) ⇒ Object



97
98
99
# File 'lib/tk/busy.rb', line 97

def busy_cget(option)
  Tk::Busy.configure(self, option)
end

#busy_configinfo(option = nil) ⇒ Object



84
85
86
# File 'lib/tk/busy.rb', line 84

def busy_configinfo(option=nil)
  Tk::Busy.configinfo(self, option)
end

#busy_configure(option, value = None) ⇒ Object



92
93
94
95
# File 'lib/tk/busy.rb', line 92

def busy_configure(option, value=None)
  Tk::Busy.configure(self, option, value)
  self
end

#busy_current?Boolean

Returns:

  • (Boolean)


112
113
114
# File 'lib/tk/busy.rb', line 112

def busy_current?
  ! Tk::Busy.current(self.path).empty?
end

#busy_current_configinfo(option = nil) ⇒ Object



88
89
90
# File 'lib/tk/busy.rb', line 88

def busy_current_configinfo(option=nil)
  Tk::Busy.current_configinfo(self, option)
end

#busy_forgetObject



107
108
109
110
# File 'lib/tk/busy.rb', line 107

def busy_forget
  Tk::Busy.forget(self)
  self
end

#busy_statusObject



116
117
118
# File 'lib/tk/busy.rb', line 116

def busy_status
  Tk::Busy.status(self)
end