Class: Shoes::Native

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

Direct Known Subclasses

Button, EditBox, EditLine, ListBox, Progress

Instance Attribute Summary

Attributes inherited from Basic

#args, #dps, #initials, #ln, #parent, #pl

Attributes included from Mod

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

Instance Method Summary collapse

Methods inherited from Basic

#center_at, #fix_size, #hide, #move3, #positioning, #set_args, #show, #style

Methods included from Mod

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

Constructor Details

#initialize(args) ⇒ Native

Returns a new instance of Native.



256
257
258
259
# File 'lib/shoes/basic.rb', line 256

def initialize args
  super
  @app.cs.setTabList @app.cs.getTabList.to_a.push(@real)
end

Instance Method Details

#clearObject



274
275
276
277
# File 'lib/shoes/basic.rb', line 274

def clear
  @real.dispose unless @real.isDisposed
  @parent.contents -= [self]
end

#focusObject



283
284
285
286
# File 'lib/shoes/basic.rb', line 283

def focus
  @real.setFocus
  @app.focus_ele = self
end

#move(x, y) ⇒ Object



266
267
268
269
# File 'lib/shoes/basic.rb', line 266

def move x, y
  @real.setLocation x, y unless @real.isDisposed
  super
end

#move2(x, y) ⇒ Object



270
271
272
273
# File 'lib/shoes/basic.rb', line 270

def move2 x, y
  @real.setLocation x, y unless @real.isDisposed
  super
end

#textObject



260
261
262
# File 'lib/shoes/basic.rb', line 260

def text
  @real.getText unless @real.isDisposed
end

#text=(s) ⇒ Object



263
264
265
# File 'lib/shoes/basic.rb', line 263

def text=(s)
  @real.setText s.to_s unless @real.isDisposed
end

#toggleObject



278
279
280
281
282
# File 'lib/shoes/basic.rb', line 278

def toggle
  @hided = !@hided
  @real.setVisible !@hided unless @real.isDisposed
  self
end