Module: Tk::Tcllib::Crosshair

Extended by:
TkCanvasItemConfig, TkComm
Includes:
TkCore
Defined in:
lib/tkextlib/tcllib/crosshair.rb,
lib/tkextlib/tcllib/crosshair.rb,
lib/tkextlib/tcllib/crosshair.rb

Constant Summary collapse

PACKAGE_NAME =
'crosshair'.freeze
TkCommandNames =
['::crosshair::crosshair'.freeze].freeze

Constants included from TkUtil

TkUtil::None, TkUtil::RELEASE_DATE

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 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

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 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 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

Class Method Details

.__item_config_cmd(id) ⇒ Object



70
71
72
73
# File 'lib/tkextlib/tcllib/crosshair.rb', line 70

def __item_config_cmd(id)
  # maybe need to override
  ['::crosshair::configure', id]
end

.__item_methodcall_optkeys(id) ⇒ Object



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

def __item_methodcall_optkeys(id)
  {}
end

.cget(w, slot) ⇒ Object



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

def cget(w, slot)
  current_itemconfiginfo(w, slot).values[0]
end

.confuginfo(w, slot = nil) ⇒ Object



82
83
84
# File 'lib/tkextlib/tcllib/crosshair.rb', line 82

def confuginfo(w, slot = nil)
  itemconfiginfo(w, slot)
end

.confugure(w, slot, value = None) ⇒ Object



79
80
81
# File 'lib/tkextlib/tcllib/crosshair.rb', line 79

def confugure(w, slot, value=None)
  itemconfigure(w, slot, value)
end

.crosshair(w, keys = {}) ⇒ Object



37
38
39
40
# File 'lib/tkextlib/tcllib/crosshair.rb', line 37

def self.crosshair(w, keys={})
  Tk.tk_call('::crosshair::crosshair', w, *hash_kv(keys))
  w
end

.current_configinfo(w, slot = nil) ⇒ Object



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

def current_configinfo(w, slot = nil)
  current_itemconfiginfo(w, slot)
end

.off(w) ⇒ Object



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

def self.off(w)
  Tk.tk_call('::crosshair::off', w)
  w
end

.on(w, keys = {}) ⇒ Object



41
42
43
# File 'lib/tkextlib/tcllib/crosshair.rb', line 41

def self.on(w, keys={})
  self.crosshair(w, keys)
end

.package_nameObject



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

def self.package_name
  PACKAGE_NAME
end

.package_versionObject



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

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

.track_off(w) ⇒ Object



55
56
57
58
# File 'lib/tkextlib/tcllib/crosshair.rb', line 55

def self.track_off(w)
  Tk.tk_call('::crosshair::track_off', w)
  w
end

.track_on(w, &b) ⇒ Object



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

def self.track_on(w, &b)
  Tk.tk_call('::crosshair::track_on', w, b)
  w
end

Instance Method Details

#crosshair_cget(slot) ⇒ Object



115
116
117
# File 'lib/tkextlib/tcllib/crosshair.rb', line 115

def crosshair_cget(slot)
  Tk::Tcllib::Crosshair.cget(self, slot)
end

#crosshair_configinfo(slot = nil) ⇒ Object



109
110
111
# File 'lib/tkextlib/tcllib/crosshair.rb', line 109

def crosshair_configinfo(slot = nil)
  Tk::Tcllib::Crosshair.configinfo(self, slot)
end

#crosshair_configure(*args) ⇒ Object



106
107
108
# File 'lib/tkextlib/tcllib/crosshair.rb', line 106

def crosshair_configure(*args)
  Tk::Tcllib::Crosshair.configure(self, *args)
end

#crosshair_current_configinfo(slot = nil) ⇒ Object



112
113
114
# File 'lib/tkextlib/tcllib/crosshair.rb', line 112

def crosshair_current_configinfo(slot = nil)
  Tk::Tcllib::Crosshair.current_configinfo(self, slot)
end

#crosshair_offObject



97
98
99
# File 'lib/tkextlib/tcllib/crosshair.rb', line 97

def crosshair_off
  Tk::Tcllib::Crosshair.off(self)
end

#crosshair_on(keys = {}) ⇒ Object



94
95
96
# File 'lib/tkextlib/tcllib/crosshair.rb', line 94

def crosshair_on(keys={})
  Tk::Tcllib::Crosshair.on(self, keys)
end

#crosshair_track_offObject



103
104
105
# File 'lib/tkextlib/tcllib/crosshair.rb', line 103

def crosshair_track_off
  Tk::Tcllib::Crosshair.track_off(self)
end

#crosshair_track_on(&b) ⇒ Object



100
101
102
# File 'lib/tkextlib/tcllib/crosshair.rb', line 100

def crosshair_track_on(&b)
  Tk::Tcllib::Crosshair.track_on(self, &b)
end