Class: Shoes::EditBox

Inherits:
Native show all
Defined in:
lib/shoes/basic.rb

Direct Known Subclasses

CodeBox

Instance Attribute Summary

Attributes inherited from Native

#state

Attributes inherited from Basic

#args, #cleared, #hided, #initials, #parent, #shows

Attributes included from Mod

#click_proc, #hover_proc, #hovered, #leave_proc, #margin_bottom, #margin_left, #margin_right, #margin_top, #release_proc

Instance Method Summary collapse

Methods inherited from Basic

#clear, #fix_size, #hide, #initialize, #move, #move3, #positioning, #remove, #show, #style, #toggle

Methods included from Mod

#click, #hover, #leave, #release, #set_margin

Constructor Details

This class inherits a constructor from Shoes::Basic

Instance Method Details

#accepts_tab=(t) ⇒ Object



393
394
395
# File 'lib/shoes/basic.rb', line 393

def accepts_tab=(t)
  textview.accepts_tab = t
end

#change(&blk) ⇒ Object



384
385
386
# File 'lib/shoes/basic.rb', line 384

def change &blk
  super @textview.buffer, &blk
end

#focusObject



388
389
390
391
# File 'lib/shoes/basic.rb', line 388

def focus
  textview.grab_focus
  @app.focus_ele = self
end

#move2(x, y) ⇒ Object



379
380
381
382
# File 'lib/shoes/basic.rb', line 379

def move2 x, y
  @app.canvas.move @real, x, y
  move3 x, y
end

#textObject



371
372
373
# File 'lib/shoes/basic.rb', line 371

def text
  @textview.buffer.text
end

#text=(s) ⇒ Object



375
376
377
# File 'lib/shoes/basic.rb', line 375

def text=(s)
  @textview.buffer.text = s.to_s
end