Module: Tk::Tcllib::Tooltip

Extended by:
TkCore
Defined in:
lib/tkextlib/tcllib/tooltip.rb,
lib/tkextlib/tcllib/tooltip.rb

Constant Summary collapse

PACKAGE_NAME =
'tooltip'.freeze
WidgetClassName =
'Tooltip'.freeze

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

Constants included from TkUtil

TkUtil::None, TkUtil::RELEASE_DATE

Class Method Summary collapse

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

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

Class Method Details

.clear(glob_path_pat = None) ⇒ Object



46
47
48
# File 'lib/tkextlib/tcllib/tooltip.rb', line 46

def self.clear(glob_path_pat = None)
  self.clear_glob(glob_path_pat)
end

.clear_children(*args) ⇒ Object



58
59
60
# File 'lib/tkextlib/tcllib/tooltip.rb', line 58

def self.clear_children(*args)
  self.clear_glob("{#{args.collect{|w| s = _get_eval_string(w); "#{s},#{s}.*"}.join(',')}}")
end

.clear_glob(glob_path_pat) ⇒ Object



50
51
52
# File 'lib/tkextlib/tcllib/tooltip.rb', line 50

def self.clear_glob(glob_path_pat)
  tk_call_without_enc('::tooltip::tooltip', 'clear', glob_path_pat)
end

.clear_widgets(*args) ⇒ Object



54
55
56
# File 'lib/tkextlib/tcllib/tooltip.rb', line 54

def self.clear_widgets(*args)
  self.clear_glob("{#{args.collect{|w| _get_eval_string(w)}.join(',')}}")
end

.database_classObject



42
43
44
# File 'lib/tkextlib/tcllib/tooltip.rb', line 42

def self.database_class
  WidgetClassNames[self::WidgetClassName]
end

.database_classnameObject



39
40
41
# File 'lib/tkextlib/tcllib/tooltip.rb', line 39

def self.database_classname
  self::WidgetClassName
end

.delay(millisecs = None) ⇒ Object



62
63
64
# File 'lib/tkextlib/tcllib/tooltip.rb', line 62

def self.delay(millisecs=None)
  number(tk_call_without_enc('::tooltip::tooltip', 'delay', millisecs))
end

.delay=(millisecs) ⇒ Object



65
66
67
# File 'lib/tkextlib/tcllib/tooltip.rb', line 65

def self.delay=(millisecs)
  self.delay(millisecs)
end

.disableObject



76
77
78
79
# File 'lib/tkextlib/tcllib/tooltip.rb', line 76

def self.disable
  tk_call_without_enc('::tooltip::tooltip', 'disable')
  false
end

.enableObject



84
85
86
87
# File 'lib/tkextlib/tcllib/tooltip.rb', line 84

def self.enable
  tk_call_without_enc('::tooltip::tooltip', 'enable')
  true
end

.erase(widget) ⇒ Object



101
102
103
# File 'lib/tkextlib/tcllib/tooltip.rb', line 101

def self.erase(widget)
  tk_call_without_enc('::tooltip::tooltip', widget.path, '')
end

.fade(mode) ⇒ Object



72
73
74
# File 'lib/tkextlib/tcllib/tooltip.rb', line 72

def self.fade(mode)
  tk_call_without_enc('::tooltip::tooltip', 'fade', mode)
end

.fade?Boolean

Returns:

  • (Boolean)


69
70
71
# File 'lib/tkextlib/tcllib/tooltip.rb', line 69

def self.fade?
  bool(tk_call_without_enc('::tooltip::tooltip', 'fade'))
end

.offObject



80
81
82
# File 'lib/tkextlib/tcllib/tooltip.rb', line 80

def self.off
  self.disable
end

.onObject



88
89
90
# File 'lib/tkextlib/tcllib/tooltip.rb', line 88

def self.on
  self.enable
end

.package_nameObject



19
20
21
# File 'lib/tkextlib/tcllib/tooltip.rb', line 19

def self.package_name
  PACKAGE_NAME
end

.package_versionObject



23
24
25
26
27
28
29
# File 'lib/tkextlib/tcllib/tooltip.rb', line 23

def self.package_version
  begin
    TkPackage.require('tooltip')
  rescue
    ''
  end
end

.register(widget, msg, keys = nil) ⇒ Object



92
93
94
95
96
97
98
99
# File 'lib/tkextlib/tcllib/tooltip.rb', line 92

def self.register(widget, msg, keys=nil)
  if keys.kind_of?(Hash)
    args = hash_kv(keys) << msg
  else
    args = msg
  end
  tk_call('::tooltip::tooltip', widget.path, *args)
end