Module: WR::ModIME

Included in:
Combobox, ComboboxEx, Edit
Defined in:
lib/wrb/imecommon.rb

Constant Summary collapse

ImmStates =
{
  :imeon  => -1,
  :imeoff =>  0
}

Instance Method Summary collapse

Instance Method Details

#IME=(state) ⇒ Object Also known as: ime=

Sets state of the IME. Give a Integer or true/false for state.
If true or false given IME will turns on or off.



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/wrb/imecommon.rb', line 15

def IME=(state)
  if state==true || state==:on || state==-1
    @_immstate = -1
  elsif state==false || state==:off || state==0
    @_immstate = 0
  elsif state==nil || state==:nocontrol
    @_immstate = nil
  else 
    raise ArgumentError, "#{state.inspect} is not allowed", caller(1)
  end
end