summaryrefslogtreecommitdiff
path: root/jni/ruby/ext/tk/lib/tkextlib/bwidget/label.rb
blob: e8d9352c627722f2ac98135985f875b0268b8731 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#
#  tkextlib/bwidget/label.rb
#                               by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
#

require 'tk'
require 'tk/label'
require 'tkextlib/bwidget.rb'

module Tk
  module BWidget
    class Label < Tk::Label
    end
  end
end

class Tk::BWidget::Label
  TkCommandNames = ['Label'.freeze].freeze
  WidgetClassName = 'Label'.freeze
  WidgetClassNames[WidgetClassName] ||= self

  def __strval_optkeys
    super() << 'helptext'
  end
  private :__strval_optkeys

  def __boolval_optkeys
    super() << 'dragenabled' << 'dropenabled'
  end
  private :__boolval_optkeys

  def __tkvariable_optkeys
    super() << 'helpvar'
  end
  private :__tkvariable_optkeys

  def set_focus
    tk_send_without_enc('setfocus')
    self
  end
end